Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
A stack of instant photos you drag or swipe through; each one develops as it reaches the top.
npx shadcn@latest add @venusui/polaroid-stackRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/polaroid-stack.tsxThe code behind the preview above.
polaroid-stack-demo.tsx
import { PolaroidStack } from "@/components/ui/polaroid-stack"
// Photos: Unsplash (free under the Unsplash License).
const photo = (id: string) => `https://images.unsplash.com/photo-${id}?w=600&h=600&fit=crop&auto=format&q=80`
export default function PolaroidStackDemo() {
return (
<PolaroidStack
className="w-[min(18rem,calc(100vw-4rem))]"
photos={[
{ src: photo("1493976040374-85c8e12f0c0e"), alt: "A pagoda at the end of an old street in Kyoto at dusk", caption: "Kyoto, golden hour" },
{ src: photo("1476610182048-b716b8518aae"), alt: "A waterfall over green cliffs at sunset", caption: "chasing waterfalls" },
{ src: photo("1490806843957-31f4c9a91c65"), alt: "Mount Fuji framed by cherry blossoms", caption: "Fuji finally showed up!" },
{ src: photo("1531366936337-7c912a4589a7"), alt: "Green and purple northern lights over snow", caption: "2 am, worth it" },
{ src: photo("1501785888041-af3ef285b470"), alt: "Rowing boats on a turquoise lake below mountains", caption: "lake day" },
]}
/>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| photos | { src: string; alt: string; caption?: string }[] | — | Photos, top first. Captions are written in a handwriting-style font. |
All <div> props; className sets the width (the stack is 4:5).
lucide-react for the arrow icon. React 19 and Tailwind CSS v4. The CLI adds the polaroid-develop keyframes and --animate-polaroid-develop.HANDWRITING for the same look everywhere.touch-pan-y); swipe left or right, or use the button.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A card that tilts in 3D toward the pointer with spring physics.
A flight boarding pass with a perforated stub and code that flips to the fare and baggage details.
Stacked cards with the next ones peeking out; Next sends the top card to the back.