# Slider

Pick a value or a range by dragging or with the arrow keys.

Import from `@a31labs/rax/slider`.

## Usage

```tsx
<Slider label="CPU limit" value={cpu} onValueChange={setCpu} step={5} showValue />
<Slider label="Price" value={[lo, hi]} onValueChange={([a, b]) => { setLo(a); setHi(b); }} />
```

## Rules

Props: `label` (required, the thumbs' accessible name; a range adds "Minimum" and "Maximum"), `value`/`defaultValue` (a number for one thumb, `[number, number]` for a range), `onValueChange`, `onValueCommitted`, `min`, `max`, `step`, `largeStep`, `format`, `locale`, `showValue`, `disabled`, `name`. Built on Base UI Slider: accent indicator, surface thumb with an accent ring, the formatted value in tabular figures at the right with `showValue`. For picking a value from a continuous range; when people need an exact figure, use NumberInput.

Page: https://rax.a31.at/components/slider
