NumberField nativelite
A numeric field with steppers, min/max/step clamping and locale formatting.
Preview
Loading the renderer…
createSurface + updateComponents, A2UI v0.9.
json
[
{
"version": "v0.9",
"createSurface": {
"surfaceId": "preview",
"catalogId": "https://ui.exponential.at/catalogs/core/v1"
}
},
{
"version": "v0.9",
"updateComponents": {
"surfaceId": "preview",
"components": [
{
"id": "root",
"component": "Stack",
"direction": "vertical",
"align": "stretch",
"children": [
"example"
]
},
{
"id": "example",
"component": "NumberField",
"label": "Seats",
"name": "seats",
"value": 3,
"min": 1,
"max": 50
}
]
}
}
]This surface through a MemoryTransport. Install and transports: React guide.
This surface through a MemoryTransport. Install and transports: SwiftUI guide.
This surface through a MemoryTransport. Install and transports: Compose guide.
This surface through a MemoryTransport. Install and transports: gpui guide.
Platforms




View exponential-ui-number-field, painted by each native renderer.
Variants
disabledProps
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | string | – | The field label. |
namerequired | string | – | The field's key in the submitted data. |
valuebind | number | – | The number; bind it. |
min | number | – | The lowest value. |
max | number | – | The highest value. |
step | number | 1 | What the steppers and arrow keys add; Shift multiplies by 10. |
precision | number | – | Decimal places shown; defaults to the step's. |
unit | string | – | A suffix after the number (kg, %). |
placeholder | string | – | Hint text while empty. |
disabled | boolean | false | Shows it inert. |
checks | [check] | – | Validation rules. |
validateOn | change | blur | submit | "blur" | When the checks run. |
Events and slots
| Name | Kind |
|---|---|
on.change | event: runs an action |
on.submit | event: runs an action |
on.focus | event: runs an action |
on.blur | event: runs an action |
Accessibility
- Role
spinbutton- Semantics
- spinbutton (valuemin/valuemax/valuenow)
| Keys | Action |
|---|---|
| ArrowUpArrowDown | ± step (Shift: ×10) |
| PageUpPageDown | ± 10 steps |
| HomeEnd | min/max |
| Enterblur | commit and clamp |
Theming
- Recipe parts
NumberField/rootNumberField/labelNumberField/fieldNumberField/decrementNumberField/incrementNumberField/unitNumberField/descriptionNumberField/errorNumberField/input- Keyed by
disabled:hover:pressed:focus:disabled:checked:open:selected:invalid:dragover