Number input - Code
Basic
Disabled
Label
Readonly
Stepper buttons
Validation
Slots
API for ix-number-input
Properties
If true, the valueChange event will return null instead of 0 for an empty input state.
This property will be removed in 5.0.0 and this behaviour will be default.
allow-empty-value-changebooleanfalseThe allowed characters pattern for the input field
allowed-characters-patternstring | undefinedDisables the input field
disabledbooleanfalseThe helper text for the input field
helper-textstring | undefinedThe info text for the input field
info-textstring | undefinedThe error text for the input field
invalid-textstring | undefinedThe label for the input field
labelstring | undefinedThe maximum value for the input field
maxnumber | string | undefinedThe minimum value for the input field
minnumber | string | undefinedname of the input element
namestring | undefinedThe pattern for the input field
patternstring | undefinedplaceholder of the input element
placeholderstring | undefinedIndicates if the field is read-only
readonlybooleanfalseIndicates if the field is required. When required, empty values (undefined) are not accepted.
requiredbooleanfalseIndicates if the stepper buttons should be shown
show-stepper-buttonsboolean | undefinedIndicates if the text should be shown as a tooltip
show-text-as-tooltipboolean | undefinedStep value to increment or decrement the input value. Default step value is 1.
stepnumber | string | undefined1If false, pressing Enter will submit the form (if inside a form).
Set to true to suppress submit on Enter.
suppress-submit-on-enterbooleanfalseText alignment within the number input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input.
text-alignment"end" | "start"'end'The valid text for the input field
valid-textstring | undefinedThe value of the input field. Supports numeric values, scientific notation (1E6, 1E-6), or undefined for empty.
valuenumber | undefined0The warning text for the input field
warning-textstring | undefinedMethods
Events
Event emitted when the input field loses focus
ixBlurvoidEvent emitted when the input field loses focus and the value has changed
ixChangenumberEvent emitted when the validity state of the input field changes
validityStateChangeValidityStateEvent emitted when the value of the input field changes
valueChangenumberSlot
Element will be displayed at the end of the input
Element will be displayed at the start of the input