NumberInput
<ui5-number-input> | Since 2.26.0The following entity is available under an experimental flag and its API and behavior are subject to change.
The ui5-number-input component is a numeric input field. It allows users to enter, edit and select numeric values.
Usage
The default step is 1 but the app developer can set a different one.
App developers can set a maximum and minimum value for ui5-number-input.
The increase/decrease button and the up/down keyboard navigation become disabled when
the value reaches the max/min or a new value is entered from the input which is greater/less than the max/min.
When to use:
- To enter or adjust numeric values.
- To adjust values for a specific step.
When not to use:
- To enter a static number (for example, postal code, phone number, or ID). In this case,
use the regular
ui5-inputinstead. - To enter dates and times. In this case, use date/time related components instead.
ES6 Module Import
import "@ui5/webcomponents/dist/NumberInput.js";
Basic Sample
Properties
accessibleName
accessibleNameRef
disabled
max
min
name
placeholder
readonly
required
step
value
valuePrecision
valueState
Slots
valueStateMessage
Events
change
input
value-state-change
Methods
No methods available for this component.
CSS Parts
No CSS parts available for this component.
CSS Custom States
No CSS custom states available for this component.
More Samples
Min Max
Value Precision
States
The ui5-number-input component supports several semantic value states, read-only mode, and disabled mode.