Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
An instant camera that fires its flash and ejects a print that slowly develops.
npx shadcn@latest add @venusui/instant-cameraRun 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/instant-camera.tsxThe code behind the preview above.
instant-camera-demo.tsx
import { InstantCamera } from "@/components/ui/instant-camera"
// Photos: Unsplash (free under the Unsplash License).
const photo = (id: string) => `https://images.unsplash.com/photo-${id}?w=500&h=500&fit=crop&auto=format&q=75`
export default function InstantCameraDemo() {
return (
<InstantCamera
defaultTaken={1}
photos={[
{ src: photo("1507525428034-b723cf961d3e"), alt: "Gentle waves on a beach at sunrise", caption: "first light" },
{ src: photo("1533105079780-92b9be482077"), alt: "White houses above a blue sea", caption: "the long way down" },
{ src: photo("1502602898657-3e91760cbb34"), alt: "The Eiffel Tower at dusk", caption: "last night in Paris" },
]}
/>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| photos | { src: string; alt: string; caption?: string }[] | — | Photos it “takes”, in order. |
| film | number | 8 | Exposures in a pack. |
| defaultTaken | number | 0 | Photos already taken when it first appears. |
| onCapture | (photo, remaining: number) => void | — | Called for each shot. |
All <div> props.
lucide-react for icons. React 19 and Tailwind CSS v4. The CLI adds the keyframes.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 lens with a working iris: blades close to the chosen aperture and snap shut when you release the shutter.
Stacked cards with the next ones peeking out; Next sends the top card to the back.