InputNumber
A customizable Svelte number input component with integrated increment/decrement buttons. Supports step/min/max configuration, and styling options.
API Reference
InputNumberProps
Extends all the standard HTML attributes of the `<div>` element.
| Property | Type | Default | Description |
|---|---|---|---|
ref $bindable | HTMLInputElement | Reference to the rendered DOM element. | |
value $bindable | union | Input value | |
onValueChange | function | Callback called on value change | |
step | union | 1 | Increment step |
min | union | Min value | |
max | union | Max value | |
decimals | number | Decimal places for rounding and display. Omit to disable. | |
color | union | InputNumber color | |
size | union | "2" | InputNumbersize |
radius | union | InputNumberradius | |
variant | union | "clear" | InputNumber variant |
align | union | "end" | Text align |
fullWidth | boolean | false | InputNumber full width |
disabled | boolean | false | Disabled state |
required | boolean | false | Required state |
readonly | boolean | readonly |