Components · Inputs
Slider
A numeric slider between min (default 0) and max (default 100). Bind value with { "$bindState": "/path" }.
ExamplesLink to this section
Rollout percent25
Users on the new version25%
Show JSONHide JSON
{
"version": 1,
"root": "page",
"elements": {
"page": {
"type": "Stack",
"props": { "gap": "sm" },
"children": ["rollout", "progress"]
},
"rollout": {
"type": "Slider",
"props": {
"label": "Rollout percent",
"min": 0,
"max": 100,
"step": 5,
"value": { "$bindState": "/rollout" }
}
},
"progress": {
"type": "Progress",
"props": {
"label": "Users on the new version",
"value": { "$state": "/rollout" }
}
}
},
"state": { "rollout": 25 }
}PropsLink to this section
Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.
| Prop | Type | Limits and defaults |
|---|---|---|
| labelrequired | string | max 120 chars |
| min | number | — |
| max | number | — |
| step | number | > 0 |
| value | number | — |
RulesLink to this section
mindefaults to 0 andmaxto 100;minmust be less thanmax.- Inputs change only the spec's own state, on the reader's page. Nothing is saved or sent.
Children and eventsLink to this section
Slider is a leaf: it does not show children. Validation warns when a leaf has some; wrap them in a Stack or Card instead.
Events: change. Bind one with on to run a state action; see Actions.