110k
New

Slider

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

Component slider-demo not found in registry.

Installation

pnpm dlx createui@latest add 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.

Component slider-range not found in registry.

Multiple Thumbs

Use an array with multiple values for multiple thumbs.

Component slider-multiple not found in registry.

Vertical

Use orientation="vertical" for a vertical slider.

Component slider-vertical not found in registry.

Controlled

Component slider-controlled not found in registry.

Disabled

Use the disabled prop to disable the slider.

Component slider-disabled not found in registry.

API Reference

See the Base UI Slider documentation.