Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIComponentsReact

Slider

A control for a number in a range, dragged or set with the keys.

Built on the headless Slider.See its API in Docs

Rendered by React 19.3.1

slider.tsx

Installation

npx shadcn@4.23.0 add https://hamur.dev/r/react/slider.json

It also adds utils. The app needs its setup first: Installation.

Usage

Give defaultValue one number for one thumb or a list for a range; min, max and step are the headless Slider's.

import { Slider } from '@/components/ui/slider'

Examples

API reference

The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Slider's API reference.