Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Slider examples · Vertical

Vertical with Indicators Slider for React

A vertical Intensity slider that snaps in steps of 25, with Min to Max named beside the track.

Framework
UI library

Named levels on a vertical track. The slider snaps to five stops, and the column beside it names them from Max at the top to Min at the bottom. Use it for intensity or quality settings.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

How does it snap?

step is 25, so the thumb lands on 0, 25, 50, 75 or 100.

How are the level names placed?

A levels array mapped into a h-52 column with justify-between, the same height as the slider, so Max sits at the top and Min at the bottom.

How does the readout follow the thumb?

The value lives in state, starting at 50, and goes back to the slider as value. The percentage under the label prints it. onValueChange receives the new value, and the handler stores it as an array.

How is it made vertical?

orientation="vertical", inside a h-52 box.

How is the slider named?

The Intensity text is a visible Label, and the slider gets the same name with aria-label, so screen readers announce what it sets. On Base UI, aria-label is one string on the slider.

What does a screen reader announce?

The number, such as 50. The level names are visual only.