Spin Button
A number input with step buttons.
MarkdownExamples
Basic
Between 1 and 50.
Decimal step
Values round to the step's precision.
API
| Prop | Type | Default |
|---|---|---|
idId for the control; generated with | string | — |
minLowest value. Home jumps here. | number | Number.NEGATIVE_INFINITY |
maxHighest value. End jumps here. | number | Number.POSITIVE_INFINITY |
stepArrow-key and button increment; PageUp/PageDown move ten steps. Its decimals set the rounding. | number | 1 |
hintHelp text under the control, announced as its description. | string | — |
labelVisible label, linked to the control. | string | — |
optionalAppends the | boolean | false |
disabledDisables the control. | boolean | false |
error
| string | boolean | — |
modelValueThe value. | number | — |
| Event | Payload |
|---|---|
update:modelValue
| [value: number | undefined] |
| Slot | Props |
|---|---|
decrementDecrease button icon. | — |
incrementIncrease button icon. | — |
Styling
- Parts
fieldfield-labelfield-optionalspinbuttonspinbutton-decrementspinbutton-inputspinbutton-incrementfield-message- States
data-field-errordata-spinbutton-errordata-spinbutton-disableddata-field-tone
Keyboard
| Keys | Action |
|---|---|
↑ / ↓ | Step up / down |
Page Up / Page Down | Ten steps |
Home / End | Minimum / maximum |
Accessibility
- The buttons repeat while held and are skipped by Tab.
- Values are clamped and rounded on blur.