---
title: Slider
description: An input where the user selects a value from within a given range.
base: base
component: true
links:
doc: https://base-ui.com/react/components/slider
api: https://base-ui.com/react/components/slider#api-reference
---
## Installation
Command
Manual
```bash
npx shadcn@latest add slider
```
Install the following dependencies:
```bash
npm install @base-ui/react
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage
```tsx
import { Slider } from "@/components/ui/slider"
```
```tsx
```
## Examples
### Range
Use an array with two values for a range slider.
### Multiple Thumbs
Use an array with multiple values for multiple thumbs.
### Vertical
Use `orientation="vertical"` for a vertical slider.
### Controlled
### Disabled
Use the `disabled` prop to disable the slider.
## RTL
To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl).
## API Reference
See the [Base UI Slider](https://base-ui.com/react/components/slider#api-reference) documentation.