Slider
deprecatedDeprecated — use the canonical element instead. Existing usages stay until they are migrated; do not build anything new on it.
Native range input with an accent fill driven by --acrm-slider-p.
Registry repaired 17 Oct 2026 (review F3): added as candidate so its existing Ladle stories (packages/ui/stories/slider.stories.tsx) are visible; no usage.md / a11y.md yet.
Used in no file in the app (main)
Default
export const Default = () => {
const [v, setV] = useState(45);
return (
<div style={{ width: 280 }}>
<input
type="range"
className="acrm-slider"
min={0}
max={100}
value={v}
onChange={(e) => setV(+e.target.value)}
style={fill(v)}
aria-label="Probability"
/>
</div>
);
};States
value 0
value 45
value 100
disabled (native)
export const States = () => (
<div style={grid}>
<div style={row}>
<Labeled label="value 0">
<input
type="range"
className="acrm-slider"
min={0}
max={100}
defaultValue={0}
style={fill(0)}
aria-label="Value 0"
/>
</Labeled>
<Labeled label="value 45">
<input
type="range"
className="acrm-slider"
min={0}
max={100}
defaultValue={45}
style={fill(45)}
aria-label="Value 45"
/>
</Labeled>
<Labeled label="value 100">
<input
type="range"
className="acrm-slider"
min={0}
max={100}
defaultValue={100}
style={fill(100)}
aria-label="Value 100"
/>
</Labeled>
<Labeled label="disabled (native)">
<input
type="range"
className="acrm-slider"
min={0}
max={100}
defaultValue={45}
style={fill(45)}
aria-label="Disabled"
disabled
/>
</Labeled>
</div>
<span style={{ color: 'var(--fg-muted)', font: 'var(--small)' }}>
Focus: keyboard focus draws the foundation ring on the thumb — no slider-specific style.
</span>
</div>
);Composition
Used for the weighted forecast.
export const Composition = () => {
const [v, setV] = useState(60);
return (
<div style={{ width: 360 }}>
<Field label="Win probability" hint="Used for the weighted forecast.">
<div style={{ display: 'flex', alignItems: 'center', gap: 'var(--sp-3)' }}>
<input
type="range"
className="acrm-slider"
min={0}
max={100}
value={v}
onChange={(e) => setV(+e.target.value)}
style={fill(v)}
aria-label="Win probability"
/>
<Input
type="number"
className="acrm-input--num"
min={0}
max={100}
value={v}
onChange={(e) => setV(Math.max(0, Math.min(100, +e.target.value || 0)))}
aria-label="Win probability (%)"
/>
</div>
</Field>
</div>
);
};