Loading preview
Animated Card
CardsA 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.
npx shadcn@latest add @venusui/camera-shutterRun 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/camera-shutter.tsxThe code behind the preview above.
camera-shutter-demo.tsx
import { CameraShutter } from "@/components/ui/camera-shutter"
export default function CameraShutterDemo() {
return <CameraShutter />
}
| Prop | Type | Default | Description |
|---|---|---|---|
| stops | number[] | [1.8 … 16] | Apertures as f-numbers, widest first. |
| defaultStop | number | — | Aperture selected at first. |
| lensLabel | string | "50mm 1:1.8" | Text engraved on the lens ring. |
| onStopChange | (stop: number) => void | — | Called when the aperture changes. |
| onCapture | (shot: { stop: number; count: number }) => void | — | Called each time the shutter fires. |
All <div> props; className sets the width.
onCapture to a real camera flow or use it as a playful confirmation control.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.
Stacked cards with the next ones peeking out; Next sends the top card to the back.
A cassette tape whose reels turn and wind the tape from one side to the other as it plays.