Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Slider examples · Styled

Minimal Style Slider for React

An Intensity slider drawn as an outlined track with no fill behind it.

Framework
UI library

A lighter look: the track is an outline instead of a solid bar, and the thumb has a thicker border. The value still fills from the start. Use it in quiet, low-contrast interfaces.

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 is the outline drawn?

The slider's class gives the part with data-slot="slider-track" a border and bg-transparent, and the thumb border-2.

How does the readout follow the thumb?

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

Does the filled range still show?

Yes. Only the track's background is removed, so the range still fills from the start to the thumb.

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 range does it cover?

0 to 100. min and max set the ends.

Can I move it from the keyboard?

Yes. The thumb takes focus with Tab. The arrow keys move it by one step, Page Up and Page Down by a larger step, and Home and End jump to the ends.