Slider
Slider
Section titled “Slider”Category: Forms & inputs
<Slider label="Volume" defaultValue={70} formatOptions={{ style: 'percent' }} maxValue={100} />;
{ /* Range slider */}<Slider label="Budget" defaultValue={[40, 80]} formatOptions={{ style: 'currency', currency: 'USD' }} maxValue={500} step={5}/>;Install: @helix-ui/core
import { Slider } from '@helix-ui/core';status: stable · since: 0.2.0
Tags: range, value, horizontal
Anatomy
Section titled “Anatomy”─────────●───────────────── single thumb─────●═══════════●───────── range (two thumbs)Layout
Section titled “Layout”- display —
block - width —
fill - height —
content - intrinsicSize —
fills width, ~32px tall - stackable —
true - fullBleed —
false
Visual
Section titled “Visual”A horizontal track with a brand-filled portion under the thumb(s). Single thumb for one value; two thumbs for a range. Optional ticks and labels.
| Name | Type | Default | Description |
|---|---|---|---|
label |
ReactNode |
— | Visible label. |
showValue |
boolean |
true |
Render the formatted current value to the right of the label. |
value |
number | number[] |
— | Controlled value(s). |
defaultValue |
number | number[] |
— | Uncontrolled initial value(s). |
minValue |
number |
0 |
Min. |
maxValue |
number |
100 |
Max. |
step |
number |
1 |
Step. |
formatOptions |
Intl.NumberFormatOptions |
— | Format the rendered output (percent, currency, units). |
onChange |
(value) => void |
— | Change handler. |
Tokens used
Section titled “Tokens used”color.bg.surface.default, color.bg.action.neutral.default, color.bg.action.brand.default, color.text.primary, color.text.secondary, color.text.muted, color.border.focus, radius.full, space.2, font.family.sans, font.size.sm, font.weight.medium, shadow.sm
Accessibility
Section titled “Accessibility”Keyboard
| Key | Action |
|---|---|
ArrowKeys |
Step value. |
PageUp |
Big step up. |
PageDown |
Big step down. |
Home |
Min. |
End |
Max. |
Composes with
Section titled “Composes with”| Component | Relation | Note |
|---|---|---|
Form |
parent |
Submitted as part of a Form. |
Field |
wraps |
Has built-in label/description. |
NumberField |
sibling |
Prompt examples
Section titled “Prompt examples”These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.
volume control
Section titled “volume control”“slider 0 to 100”
<Slider label="Volume" value={vol} onChange={setVol} minValue={0} maxValue={100} />price range
Section titled “price range”“range slider for min/max price”
<Slider label="Price" value={range} onChange={setRange} minValue={0} maxValue={500} />