Controls

Slider

An interactive control that lets users select a value from a range by dragging a handle horizontally or vertically.

Slider

A slider is a horizontal bar that you can drag left or right to select a value within a range, similar to adjusting volume.

Loading...

Installation

npx shadcn@latest add @intentui/slider

Composed components

When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.

This component comes packed with several components to enhance functionality and provide a seamless experience.

Manual installation

npm i react-aria-components

Step

Set a step value on the slider, and it will increment or decrement by that fixed amount each time you adjust it.

Loading...

Tooltip

Add a tooltip to the slider to show the current value.

Loading...

Range

By passing an array to the defaultValue or value props, you can create a range slider.

Loading...

Orientation

You can change the orientation of the slider to vertical.

Loading...

Suffix and prefix

Sometimes you need to add a prefix or suffix to the slider, like a volume icon.

Loading...

Description

Add a description to the slider.

Loading...

Controlled

You can control the slider's value by using the value prop.

Loading...

Disabled

When the slider is disabled, it appears grayed out and becomes non-interactive.

Loading...
Unlock the full power of
Design Intent UI
Build modern web apps faster with 350+ blocks and polished templates crafted for professionals.
Explore