NumberFieldΒΆ

/libs/granite/ui/components/foundation/form/numberfield

NumberField is an input component where the user can only enter numbers. It supports increment and decrement features, where the step and boundary values can be configured.

It extends Field component.

It has the following content structure:

granite:FormNumberField
  1. granite:FormField
  2. granite:commonAttrs
namestring

The name that identifies the field when submitting the form.

valuestringel

The value of the field.

disabledboolean

Indicates if the field is in disabled state.

requiredboolean

Indicates if the field is mandatory to be filled.

validationstring
multiple

The name of the validator to be applied. E.g. foundation.jcr.name. See validation in Granite UI.

mindouble

The minimum value allowed.

maxdouble

The maximum value allowed.

stepdouble
  1. 1

The increment/decrement step amount.

defaultValuestring
  1. 0

The fallback value when the input does not provide an initial value.