Skip to content
Dumb UI

Search Dumb UI

Jump to a page or component, or switch the style

Search Dumb UI

Jump to a page or component, or switch the style

Slider

Pick a value or range by dragging. Optional value bubbles and formatted aria-valuetext.

FormsRadix SliderDumb extras
Props
40
1
$ pnpm dlx shadcn@latest add @dumb/slider

Needs the @dumb registry in components.json and the style tokens. See Installation.

import { Slider } from "@/components/ui/slider"
<Slider defaultValue={[40]} max={100} step={1} aria-label="Volume" />

Range with values

Two thumbs, showValue and formatValue for currency.

API reference

Props marked “extra” are Dumb UI additions. Everything else matches shadcn/ui.

Slider

PropTypeDefault
showValueextraboolean | "interaction"

Shows each thumb's value; "interaction" only while hovered, focused or dragged.

false
formatValueextra(value: number) => string

Formats the bubble and aria-valuetext.

String
aria-labelstring

Forwarded to every thumb (with minimum/maximum suffixes for ranges).

-
ArrowLeftArrowDown
Decreases by one step.
ArrowRightArrowUp
Increases by one step.
PageUpPageDown
Moves by a larger step.
HomeEnd
Jumps to min or max.