Represents options for a number input.
The NumberInputOptions interface provides a set of properties that control the
behavior and appearance of a number input. These options include settings for the
input label, input label position, value, value setter, disabled state, minimum value,
maximum value, step value, suffix, and requireConfirm.
Extends#
InputOptions<number>
Properties#
| Property | Type | Default value | Description | Inherited from |
|---|---|---|---|---|
inputLabel? |
string |
string[] |
undefined |
- |
inputLabelPosition? |
"left" |
"top" |
undefined |
- |
value |
number |
undefined |
- | InputOptions.value |
setValue |
(value) => void |
undefined |
- | InputOptions.setValue |
isDisabled? |
boolean |
undefined |
- | InputOptions.isDisabled |
suffix? |
Suffix |
undefined |
- | InputOptions.suffix |
min? |
number |
undefined |
- | - |
max? |
number |
undefined |
- | - |
step? |
number |
undefined |
- | - |
requireConfirm? |
boolean |
true |
Whether to require explicit confirmation (Enter/Escape/blur) before applying changes. When true, changes are only applied when user presses Enter/ESC or blurs the input. When false, changes are applied immediately on every keystroke. | - |
showStepper? |
boolean |
false |
Renders a decrement and an increment button inside the input. Each press changes the value by step and stops at min and max. Holding a button repeats the step. Typing a value into the input keeps working. The buttons are not tab stops. The input’s Up and Down arrow keys already do the same thing, which is what the WAI-ARIA spinbutton pattern expects. |
- |