---
title: "Inline Slider"
description: "Free React slider with an inset fill and the label and value inside the track. The thumb parts around the text as it passes. Keyboard accessible, 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/inline"
markdown: "https://beui.dev/components/motion/range-slider/inline.md"
license: "MIT"
---

# Inline Slider

> Free React slider with an inset fill and the label and value inside the track. The thumb parts around the text as it passes. Keyboard accessible, shadcn install.

## Install

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

## Dependencies

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

## Usage

### Inline Slider usage

An inset fill and inline label and value. Ten evenly spaced stops span the track; markers under text stay hidden but remain interactive, and the thumb parts around either label as it passes.

```tsx
"use client";

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

export function InlineSliderPreview() {
  return (
    <div className="w-full max-w-sm">
      <InlineSlider
        sound
        defaultValue={48}
        min={8}
        max={128}
        step={8}
        label="Icon size"
        aria-label="Icon size"
        formatValueText={(value) => `${value} pixels`}
      />
    </div>
  );
}
```

## API Reference

### InlineSlider

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `step` | `number` | — | No | Rounds snap-stop values. While dragging, the readout keeps this step's decimal precision. |
| `label` | `string` | — | Yes | Compact label inside the left edge of the track. |
| `format` | `((value: number) => string)` | — | No | Formats the inline value without changing its precision. |
| `showTicks` | `boolean` | `true` | No | Show markers for the ten evenly spaced snap stops, except where they overlap inline text. |
| `className` | `string` | — | No | Classes merged onto the track element. |
| `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 |
| `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

- [Range Slider](https://beui.dev/components/motion/range-slider/stepped.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-inline
- Raw source: https://beui.dev/r/range-slider-inline/raw
- GitHub: https://github.com/starc007/ui-components
