#047
Step and disabled
A slider that snaps in steps of 10 and a disabled slider fixed at 35.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Step and disabled" pattern (@codeatlasdev/ui demo #047, inputs/slider) in my app.
Call get_demo({ ids: ["#047"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Discrete values such as percentages in tens, or a locked setting.
Keep these library parts, with the props and tokens the demo uses:
- Slider from "@codeatlasdev/ui"
Behaviour to keep:
- Stepped slider: `<Slider bind:value={stepped} min={0} max={100} step={10} />` with initial `$state(50)`
- Disabled slider: `<Slider value={35} disabled />`
- Rows labelled Step 10 and Disabled with readouts `{stepped}` and 35
- Wrapper `.col` uses `max-width: 480px`
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Slider
@codeatlasdev/ui
How it is built
- Stepped slider: `<Slider bind:value={stepped} min={0} max={100} step={10} />` with initial `$state(50)`
- Disabled slider: `<Slider value={35} disabled />`
- Rows labelled Step 10 and Disabled with readouts `{stepped}` and 35
- Wrapper `.col` uses `max-width: 480px`
Related
Loading source.