Slider
Inputs & Controls
macOS track slider with circular thumb control.
Installation
$npx shadcn-macos@latest add slider
Examples
Display Brightness65%
Props
<Slider />| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | — | Controlled numeric value. |
| defaultValue | number | 0 | Initial numeric value when uncontrolled. |
| min | number | 0 | Minimum allowable value. |
| max | number | 100 | Maximum allowable value. |
| step | number | 1 | Step granularity for slider adjustments. |
| onChange | (value: number) => void | — | Callback triggered when the slider value changes. |
| disabled | boolean | false | Whether the slider thumb is draggable. |
| className | string | — | Custom styling classes. |