Syed

PhotoBox

Galleries 36

About

An interactive keepsake photo box with a frosted translucent sleeve, sliding Polaroid print tray, hover lift physics, and an accessible full-bleed print viewer modal.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds PhotoBox to your project and fits it to your theme.

Code

How PhotoBox is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import React from "react";
import { PhotoBox } from "@/components/ui/photo-box";

const settings = {
  title: "写真箱",
  subtitle: "Photo Box",
  defaultOpen: false,
  accentColor: "#F28C38",
  theme: "auto",
};

const VALID_THEMES = ["auto", "light", "dark"] as const;
type ThemeOption = (typeof VALID_THEMES)[number];

export default function PhotoBoxDemo(props: Partial<typeof settings>) {
  const config = {
    ...settings,
    ...props,
  };

  const theme: ThemeOption = VALID_THEMES.includes(config.theme as ThemeOption)
    ? (config.theme as ThemeOption)
    : "auto";

  const accentColor =
    typeof config.accentColor === "string" &&
    /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(config.accentColor.trim())
      ? config.accentColor.trim()
      : "#F28C38";

  const canvasBg =
    theme === "light"
      ? "bg-[#F4F4F3]"
      : theme === "dark"
      ? "bg-[#141413]"
      : "bg-[#F4F4F3] dark:bg-[#141413]";

  return (
    <div
      className={`flex min-h-[460px] w-full items-center justify-center p-8 transition-colors duration-300 ${canvasBg}`}
    >
      <PhotoBox
        title={typeof config.title === "string" ? config.title : "写真箱"}
        subtitle={
          typeof config.subtitle === "string" ? config.subtitle : "Photo Box"
        }
        defaultOpen={Boolean(config.defaultOpen)}
        accentColor={accentColor}
        theme={theme}
      />
    </div>
  );
}

Dependencies

More by Syed

View all
  • Animated Beam Integration

    Animated Beam Integration

    138
  • Agency Bento Grid

    Agency Bento Grid

    90
  • Morphing Island Navbar

    Morphing Island Navbar

    82
  • SpatialCardCarousel

    SpatialCardCarousel

    77
  • Emotion Wheel v2

    Emotion Wheel v2

    70
  • Animated Tree View

    Animated Tree View

    60
  • Interactive Eye Tracker

    Interactive Eye Tracker

    60
  • Rolling Counter

    Rolling Counter

    56

More in Galleries

View all
  • Scattered About

    Scattered About

    14
  • Animated Gallery

    Animated Gallery

    1.5K
  • Photo Deck

    Photo Deck

    4
  • Gallery Component

    Gallery Component

    5
  • Editorial Collage Hero

    Editorial Collage Hero

    507
  • Elastic Gallery

    Elastic Gallery

    1.1K
  • Image Gallery

    Image Gallery

    130
  • Folded Card

    Folded Card

    42