Capture numeric input with increment & decrement controls, built on Base UI.
View as MarkdownInstallation
Component API
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | |
description | string | - | A line under the control, for context on what the number means. |
| A line under the control, for context on what the number means. | |||
error | string | - | |
success | string | - | Green border & this message in place of description. |
Green border & this message in place of description. | |||
defaultValue | number | - | |
min | number | - | |
max | number | - | |
step | number | 1 | Amount each click of increment or decrement changes the value by. |
| Amount each click of increment or decrement changes the value by. | |||
size | sm | md | lg | md | |
shape | none | rounded | pill | rounded | |
disabled | boolean | false | Blocks interaction and dims the whole control, label included. |
| Blocks interaction and dims the whole control, label included. | |||
required | boolean | false | Appends a red asterisk to the label & sets the input's native required attribute. |
Appends a red asterisk to the label & sets the input's native required attribute. | |||
animated | boolean | true | |
className | string | - | |
focus | boolean | string | true | |