Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
3D dice that tumble and land on a fair, random face, with the total announced.
npx shadcn@latest add @venusui/dice-rollerRun 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/dice-roller.tsxThe code behind the preview above.
dice-roller-demo.tsx
import { DiceRoller } from "@/components/ui/dice-roller"
export default function DiceRollerDemo() {
return <DiceRoller />
}
| Prop | Type | Default | Description |
|---|---|---|---|
| count | number | 2 | How many dice. |
| onRoll | (values: number[]) => void | — | Called with each roll. |
All <div> props.
count; the dice wrap onto more rows on small screens.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 sheet of bubble wrap to pop one by one, or a whole row with a drag.
A lens with a working iris: blades close to the chosen aperture and snap shut when you release the shutter.