GitHub 560+

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} />

Examples

Range

Use an array with two values for a range slider.

Vertical

Use orientation="vertical" for a vertical slider.

Disabled

Use the disabled prop to disable the slider.

API Reference

See the GitHub source code for more information on props. See the data-slot docs for more information on interactivity.