Forms
Slider
Pick a value or a range by dragging, with the value shown and formatted.
Ant Design: Slider
import { Slider } from '@alea/ui';
Examples
Slider
One value, shown and formatted.
Range
An array value gives two thumbs; name each one.
Props
Slider props
Pick a value, or a range when value is an array (two thumbs). Arrows, Page Up/Down, Home and End work.
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | - | The visible label. |
showValue | boolean | true | Show the current value next to the label. Default true. |
thumbLabels | string[] | - | Labels for each thumb in a range ("Minimum", "Maximum"). |
Accessibility
- Each thumb is a slider with its own label in a range.
Keyboard
| Key | Does |
|---|---|
| Arrow keys | Step |
| Page Up / Down | Bigger steps |
| Home / End | Min / max |
Do and don't
Do
- Show the value.
- Use formatOptions for units.
Don't
- Don't use when an exact number matters: add a NumberField.