<kern-step-input>
Number field with − and + buttons, form-associated. value is a number ('' when empty); typed text is applied on Enter or when leaving the field, limited to min/max and rounded to the decimals of step. Accepts the locale's decimal comma. Keyboard: Arrow Up/Down ± step, Page Up/Down ± 10 × step, Home/End = min/max; holding a button repeats.
Examples
Number with steps
value is a number, limited to min/max and rounded to the decimals of step; unit follows the number. The field accepts the locale's decimal comma. Keyboard: Arrow Up/Down ± step, Page Up/Down ± 10 × step, Home/End jump to min/max; holding a button repeats.
Locale, required and states
With locale="de-DE" the field shows and accepts a decimal comma (-0,25). required blocks an empty submission; readonly and disabled stop changes.
Properties
ariaLabelTextstring | undefined
Accessible name when there is no visible label.
disabledboolean
errorstring | undefined
hintstring | undefined
labelstring | undefined
labelDecreasestring | undefined
labelIncreasestring | undefined
labelInvalidstring | undefined
Shown for text that is not a number.
localestring | undefined
BCP 47 locale for the decimal separator; defaults to <html lang>, then the browser language.
maxnumber | undefined
minnumber | undefined
namestring | undefined
noImplicitSubmitboolean
Enter does not submit the surrounding form.
placeholderstring | undefined
readonlyboolean
requiredboolean
size"md" | "sm"
stepnumber
Step for buttons and keys; its decimals set the precision (0.5 → one decimal).
unitstring | undefined
Unit after the number, e.g. „°C“, „%“, „s“.
value"" | number
The number, or '' when empty.
Events
kernChangeCustomEvent<{ value: number | null; }>
When the number changes (null when emptied).
Methods
setFocus()setFocus() => Promise<void>
Focuses the field.
CSS parts
controlThe field box