Slider
atomRange input styled with Lucent tokens for selecting a numeric value within a bounded range. Supports controlled and uncontrolled usage, three sizes, and an inline value display.
Sizes
Three track sizes — sm, md, and lg.
Controlled with value display
Controlled slider with live numeric readout.
Disabled
Disabled state prevents interaction.
Usage
Installation
API Reference
Slider props — * required
| Prop | Type | Default | Description |
|---|---|---|---|
min | number | 0 | Minimum value. |
max | number | 100 | Maximum value. |
step | number | 1 | Increment step between values. |
value | number | — | Controlled current value. Pair with onChange. |
defaultValue | number | — | Initial value for uncontrolled usage. Defaults to the midpoint of min/max. |
onChange | (e: React.ChangeEvent<HTMLInputElement>) => void | — | Called on every value change. |
label | string | — | Visible label rendered above the track. |
showValue | boolean | false | Displays the current numeric value beside the label. |
size | "sm" | "md" | "lg" | "md" | Controls track thickness and thumb diameter. |
disabled | boolean | false | Prevents interaction and dims the control. |