InputNumber is used as a controlled input with v-model property.
Localization information such as grouping and decimal symbols are defined with the locale property which defaults to the user locale.
Monetary values are enabled by setting mode property as currency. In this setting, currency property also needs to be defined using ISO 4217 standard such as "USD" for the US dollar.
Custom texts e.g. units can be placed before or after the input section with the prefix and suffix properties.
Spinner buttons are enabled using the showButtons property and layout is defined with the buttonLayout.
Buttons can also placed vertically by setting buttonLayout as vertical.
Invalid state is displayed using the invalid prop to indicate a failed validation. You can use this style when integrating with form validation libraries.
When disabled is present, the element cannot be edited and focused.
Value to describe the component can either be provided via label tag combined with inputId prop or using aria-labelledby, aria-label props. The input element uses spinbutton role in addition to the aria-valuemin, aria-valuemax and aria-valuenow attributes.
Key | Function |
---|---|
tab | Moves focus to the input. |
up arrow | Increments the value. |
down arrow | Decrements the value. |
home | Set the minimum value if provided. |
end | Set the maximum value if provided. |