A real six-sided die. Click it and it tumbles, jumps and lands on a random face. Opposite faces add to seven.
Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.
| Prop | Type | Default | Description |
|---|---|---|---|
| size | number | 96 | Edge length in px. |
| onRoll | (value: number) => void | Called with the rolled number once the die has landed. | |
| initial | number | 1 | Starting face, 1 to 6. |
| className | string | Extra classes added to the outer element. |