Forms & selection@neumorphism-ui/slider

Slider

Built on Base UI Slider with both single-value and number[] range APIs. Creates one thumb per array item, names each input through thumbLabels, and supports horizontal or vertical orientation with controlled or uncontrolled values.

@neumorphism-ui/slider
Registry JSON

Preview

Price range₩32K – ₩72K
Vertical orientation

Installation

Installation: slidernpx shadcn@latest add @neumorphism-ui/slider

The CLI resolves npm dependencies, base tokens, utilities, and component source in order.

New to this Registry? Set up the namespace before continuing.

Usage

Usage: Installationnpx shadcn@latest add @neumorphism-ui/slider @neumorphism-ui/label

Import

Slider import code
import { Slider } from "@/components/ui/slider"
import { Label } from "@/components/ui/label"

Example

Slider usage code
<div className="grid gap-3">
  <div className="flex justify-between">
    <Label id="depth-label">Depth intensity</Label>
    <output>64%</output>
  </div>
  <Slider
    defaultValue={[64]}
    min={0}
    max={100}
    step={1}
    aria-labelledby="depth-label"
    thumbLabels={["Depth intensity"]}
  />
</div>

API Reference

ComponentPropTypeDefaultDescription
Slidervalue / defaultValuenumber[][min]The controlled value or initial uncontrolled value for each thumb.
Slidermin / maxnumber0 / 100The selectable numeric range.
Sliderstepnumber1The increment used for keyboard and pointer adjustment.
Sliderorientation"horizontal" | "vertical""horizontal"Sets the track direction and keyboard axis.
SliderthumbLabelsreadonly string[]—Accessible names passed to the actual thumb inputs in value order.
SlideronValueChange / onValueCommitted(value: number | number[]) => void—Provides the array of values while adjustment occurs or when it finishes.
SliderdisabledbooleanfalseDisables interaction for every thumb.

Accessibility

  • 01

    Name the Slider group with aria-label or aria-labelledby, and pass each control-point name to thumbLabels in value order.

  • 02

    Base UI manages role=slider, current, minimum, and maximum values, plus Arrow, Page, Home, and End key behavior for every thumb.

  • 03

    Provide one thumbLabels entry for a single value, or distinct names such as minimum and maximum for a range.