Slider
Slider component built on the native range input, with label, value, steps and a filled track.
How to use it
Run npx @blossomui/react add slider, or copy src/components/UI/Slider/Slider.tsx into your React project and import it.
import { Slider } from './components/ui/Slider'Props
SliderProps
| Prop | Type | Description |
|---|---|---|
| hint | string | Helper text shown under the slider. |
| error | string | Error message. It is shown in red under the slider. |
| color | string | Accent color of this component: any CSS color. Without it the component uses `--blossom-accent`, which is pink by default. |
| min | number | |
| max | number | |
| step | number | |
| value | number | |
| defaultValue | number | |
| onChange | (value: number) => void | |
| label | string | |
| showValue | boolean | Show the current value next to the label. |
| unit | string | Text added after the value, for example "%" or "px". |
| disabled | boolean |