View fulldotdev/ui on GitHub

Slider

An input where the user selects a value from within a given range.

Installation

npx shadcn@latest add @fulldev/slider

Usage

import { Slider } from "@/components/ui/slider"
<Slider defaultValue={[33]} max={100} step={1} />

Range

Use an array with two values for a range slider.

Multiple Thumbs

Use an array with multiple values for multiple thumbs.

Vertical

Use orientation="vertical" for a vertical slider.

Controlled

Disabled

Use the disabled prop to disable the slider.

RTL

To enable RTL support in shadcn/ui, see the RTL configuration guide.

API Reference

Source: react/src/components/ui/slider.tsx

See the Base UI Slider documentation.