bloxa

Slider

FREE

Slider with single or range values, value bubbles, steps and labelled marks.

Playground

Change the props and watch the component and its code update live.

Props
Code
import { Slider } from "@/components/ui/slider";

<Slider
  defaultValue={[40]}
  showValue="active"
/>

Installation

Terminal
npx @bloxa/cli add slider
# or: npx shadcn@latest add @bloxa/slider

Packages installed automatically: radix-ui

Examples

Basic

Range

Steps and marks

API reference

Every component also accepts the props of the element it renders.

Slider

PropTypeDefaultDescription
value / defaultValuenumber[]—Two values make it a range.
min / max / stepnumber0 / 100 / 1Bounds and step.
showValue"always" | "active" | falsefalseValue bubble above the thumb.
formatValue(value: number) => string—Formats the bubble text.
marks{ value, label? }[]—Marks along the track.
thumbLabelsstring[]—Accessible name per thumb.