A number field with raised minus and plus buttons. Hold a button to keep stepping. A real spinbutton with arrow, PageUp, PageDown, Home and End keys.
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 |
|---|---|---|---|
| value | number | Current value. Set it to control the component. | |
| defaultValue | number | 0 | Starting value when uncontrolled. |
| onValueChange | (value: number) => void | Called with the new value. | |
| min | number | -Infinity | Smallest allowed value. |
| max | number | Infinity | Largest allowed value. |
| step | number | 1 | Amount added or taken away by each step. |
| unit | string | Text shown after the number, such as "kg". | |
| aria-label | string | Required: names the field for screen readers. | |
| className | string | Extra classes added to the outer element. |