#992
Label and number
Two labelled sliders with an editable number and a unit: radius and type scale.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Label and number" pattern (@codeatlasdev/ui demo #992, inputs/slider) in my app.
Call get_demo({ ids: ["#992"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Tuning a numeric setting where both scrubbing and typing an exact value matter.
Keep these library parts, with the props and tokens the demo uses:
- SliderField from "@codeatlasdev/ui"
Behaviour to keep:
- Two `<SliderField` stacked in a column
- First: `label="Radius"`, `bind:value={radius}`, `min={0}`, `max={2}`, `step={0.05}`, `unit="x"`, initial `0.8`
- Second: `label="Type scale"`, `bind:value={scale}`, `min={0.8}`, `max={1.3}`, `step={0.01}`, `unit="x"`, initial `1`, with a `description` Multiplies every font size.
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
- SliderField
@codeatlasdev/ui
How it is built
- Two `<SliderField` stacked in a column
- First: `label="Radius"`, `bind:value={radius}`, `min={0}`, `max={2}`, `step={0.05}`, `unit="x"`, initial `0.8`
- Second: `label="Type scale"`, `bind:value={scale}`, `min={0.8}`, `max={1.3}`, `step={0.01}`, `unit="x"`, initial `1`, with a `description` Multiplies every font size.
Related
Loading source.