Number Input API
Properties
| Name | Type | Default | Description |
|---|---|---|---|
value | integer | 0 | Default value of the input. |
disabled | boolean | false | Disables the input. |
readonly | boolean | false | Sets the read-only state. |
invalid | boolean | false | Sets the invalid (error) state. |
size | "small" | "medium" | "large" | — | Size of the input. |
integer | boolean | false | Restricts input to integer numbers only. |
min | integer | — | Minimum allowed value. |
max | integer | — | Maximum allowed value. |
step | number | 1 | Step size for increment and decrement. |
default-value | number | null | Fallback value used when the input is empty. |
Events
| Event | Description | Returns | |
|---|---|---|---|
change | Fires on blur. | { detail: { value } } | |
input | Fires on each input change. | { detail: { value } } | |
error | Fires on blur when the value is non-numeric or outside the min/max range. | { detail: { message: string } } | |