Number Field
- Common Input Field Features
- Step Buttons
- Minimum and Maximum Value
- Step
- Number Type Variants
- Best Practices
Number Field has many of the same features as Text Field, but it accepts only numeric input.
The input can be a decimal, an integer or a big decimal.
You can specify a unit as a prefix, or a suffix for the field.
Minimum and Maximum Value
The valid input range of a Number Field is set by defining the minimum and maximum values.
You can set the Helper text to give information about the range.
Step
The step value of a Number Field defines the numeric intervals that are allowed.
It specifies the amount by which the value increases or decreases when using the Up or Down arrow keys, or the step buttons.
It also invalidates the field if the value entered doesn’t align with the specified step.
Number Type Variants
BigDecimal Field
Java developers who need to support the BigDecimal type can use Big Decimal Field:
Best Practices
Number Field should be used for actual number values, such as counts and measures — values that may be part of a calculation. Don’t use it for other digit-based values, such as telephone, credit card, and social security numbers. These values can have leading zeros and be greater than Number Field’s maximum supported value.
When applicable, set the most common choice as the default value. For example, airline, bus, train and other travel companies typically set the default number of passengers to 1.
69FAE707-4778-4093-8FB9-8BAE22E9D7F6