---
title: "Range Slider"
description: "Free React range slider with tick dots and a bar thumb that bounces as it lands on each step. Keyboard accessible. Framer Motion, Tailwind, shadcn install."
category: "Components"
parent: "https://beui.dev/components/motion/range-slider"
publishedAt: "2026-06-24"
updatedAt: "2026-11-25"
documentation: "https://beui.dev/components/motion/range-slider/stepped"
markdown: "https://beui.dev/components/motion/range-slider/stepped.md"
license: "MIT"
---

# Range Slider

> Free React range slider with tick dots and a bar thumb that bounces as it lands on each step. Keyboard accessible. Framer Motion, Tailwind, shadcn install.

## Install

```bash
npx shadcn@latest add @beui/range-slider
```

## Dependencies

- `clsx`
- `motion`
- `react`
- `tailwind-merge`

## Usage

### Range Slider usage

Tick dots, and a vertical-bar thumb that bounces as it lands on each step.

```tsx
"use client";

import { useState } from "react";

import { RangeSlider } from "@/components/motion/range-slider";

export function RangeSliderPreview() {
  const [value, setValue] = useState(40);

  return (
    <div className="flex w-full max-w-sm flex-col gap-3">
      <div className="flex items-center justify-between text-sm text-muted-foreground">
        <span>Drag the handle</span>
        <span className="tabular-nums text-foreground">{value}</span>
      </div>
      <RangeSlider sound value={value} onValueChange={setValue} step={5} aria-label="Value" />
    </div>
  );
}
```

## API Reference

### RangeSlider

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `showTicks` | `boolean` | `true` | No | Render a tick dot at each step. |
| `className` | `string` | — | No | Classes merged onto the slider track. |
| `value` | `number` | — | No | The current value, for controlled use. |
| `defaultValue` | `number` | — | No | The initial value when uncontrolled. Default: 0 |
| `onValueChange` | `((value: number) => void)` | — | No | Called with the snapped value whenever a drag or key press changes it. |
| `min` | `number` | — | No | Lowest value on the track. Default: 0 |
| `max` | `number` | — | No | Highest value on the track. Default: 100 |
| `step` | `number` | — | No | Increment values snap to when dragging or using arrow keys. Default: 1 |
| `disabled` | `boolean` | — | No | Ignores pointer and keyboard input. Default: false |
| `aria-label` | `string` | — | No | Accessible name for the slider handle. |
| `formatValueText` | `((value: number) => string)` | — | No | Announced instead of the raw number — pass one when the value carries a unit or a suffix ("72.5 kg", "35%"); a bare number needs no valueText. |
| `sound` | `boolean` | — | No | Play a tiny tick per step, higher toward the max. Off by default; a `SoundProvider` can mute it app-wide. |

## More in Range Slider

- [Inline Slider](https://beui.dev/components/motion/range-slider/inline.md)
- [Fluid Slider](https://beui.dev/components/motion/range-slider/fluid.md)
- [Wave Slider](https://beui.dev/components/motion/range-slider/wave.md)
- [Bubble Slider](https://beui.dev/components/motion/range-slider/bubble.md)
- [Ruler Slider](https://beui.dev/components/motion/range-slider/ruler.md)

## Source

- Registry detail: https://beui.dev/r/range-slider
- Raw source: https://beui.dev/r/range-slider/raw
- GitHub: https://github.com/starc007/ui-components
