field.number

A component that allows you to enter a number.

The box already has validation: by default, users can enter only numbers and decimal separators. They can use either a dot or a comma as a separator, but there will always be a dot in the output.

When the user is entering a number, the separator automatically changes to the one specified in the regional settings. For Russia, the separator is a comma.

Negative numbers are allowed by default. To disable them, use the validation property. Pressing the up or down arrow keys will increase or decrease the number by one.

Component properties

NameTypeDescription
type*"field.number"

Set component type

data*writable

Data with values that will be processed or changed.

labelstring

Label above the component.

hintstring

Hint text.

maximuminteger

Maximum number that can be entered.

minimuminteger

Minimum number that can be entered.

placeholderstring

A semi-transparent label that is shown in the box when it is empty.

validationcondition

Validation based on condition.