# Slider

> Range slider with a pill thumb.

Registry name: `slider`. HTML docs: https://ui.anuragroy.dev/component/slider.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/slider.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/slider.json`.

Registry JSON: https://ui.anuragroy.dev/r/slider.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/slider.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import { Slider } from "@/components/ui/slider"
```

## Usage

```tsx
import { Slider } from "@/components/ui/slider"

export function Example() {
  return <Slider defaultValue={[40]} />
}
```

## API

### Slider

Base UI Slider. Pass an array for `value` / `defaultValue` — multiple numbers render multiple thumbs.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` | number[] | — |  |
| `value` | number[] | — |  |
| `min` | number | — |  |
| `max` | number | — |  |
| `step` | number | — |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/slider): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/slider.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
