<Slider aria-label="Opacity" defaultValue={50}>
<SliderControl />
</Slider>npx shadcn@latest add @dotui/sliderUse slider to allow users to select a value from within a given range.
import { Slider, SliderControl } from "@/components/ui/slider";<Slider defaultValue={50}>
<SliderControl />
</Slider>Use the controls below to experiment with different slider props and see the live preview and code update.
The orientation of the Slider.
Orientation<Slider defaultValue={50}>
<Label>Volume</Label>
<SliderControl />
</Slider>A slider allows a user to select one or more values within a range.
| Prop | Type | Default | |
|---|---|---|---|
boolean | — | ||
Orientation | 'horizontal' | ||
ReactNode | function | — | ||
number | number[] | — | ||
number | number[] | — | ||
function | — | ||
function | — | ||
NumberFormatOptions | — | ||
A slider track is a container for one or more slider thumbs.
| Prop | Type | Default | |
|---|---|---|---|
ReactNode | function | — | ||
Last updated on 1/13/2026
Bringing singularity to the web.
Built with passion by @mehdibha.