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
Name | Type | Description |
---|---|---|
type * | "field.number" | Set component type |
data * | writable | Data with values that will be processed or changed. |
label | string | Label above the component. |
hint | string | Hint text. |
maximum | integer | Maximum number that can be entered. |
minimum | integer | Minimum number that can be entered. |
placeholder | string | A semi-transparent label that is shown in the box when it is empty. |
validation | condition | Validation based on condition. |
Name | Type | Description |
---|---|---|
type * | "field.number" | Set component type |
data * | writable | Data with values that will be processed or changed. |
label | string | Label above the component. |
hint | string | Hint text. |
maximum | integer | Maximum number that can be entered. |
minimum | integer | Minimum number that can be entered. |
placeholder | string | A semi-transparent label that is shown in the box when it is empty. |
validation | condition | Validation based on condition. |