Set min, max, and step. Add a unit after the column.
focus-minutes.tsx
NumberWheel
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| name | string | — | The form field name: a hidden input sends the number. |
| layout | "drum""flat" | — | drum bends the rows on a turning wheel; flat only fades them. |
| visible | number | — | How many rows show, an odd number (5 by default). |
| read | boolean | — | |
| invalid | boolean | — | |
| size | "default""lg""sm" | — | |
| variant | "framed""plain" | — | |
| value | number | — | |
| default | number | — | The first value; min when left out. |
| on | — | ||
| min | number | 0 | |
| max | number | 100 | |
| step | number | 1 | The space between two rows. |
| loop | boolean | false | Turn past max back to min (off by default: a number has ends). |
| format | NumberFormatOptions | — | How each row reads: digits, a currency, a percent (Intl.NumberFormat options). |
| unit | ReactNode | — | A unit after the column ("kg", "min"). Put it in aria-label too. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
| Tab | Moves to the next column. Each column is one tab stop. |
|---|---|
| Up ArroworDown Arrow | Turns the column one row and sets the value. |
| Page UporPage Down | Turns the column five rows. |
| HomeorEnd | Goes to the first or the last row that is not disabled. |
| Left ArroworRight Arrow | Moves to the column before or after. |
Built with
Installs with Number Wheel
- Components
- Wheel











