---
title: Slider
description: An input where the user selects a value from within a given range.
links:
doc: https://base-ui.com/react/components/slider#api-reference
---
## Installation
CLI
Manual
```bash
npx shadcn@latest add @coss/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, SliderValue } from "@/components/ui/slider"
```
```tsx
```
## API Reference
### Slider
Root component. Styled wrapper for `Slider.Root` from Base UI with default min/max values and edge-aligned thumbs.
| Prop | Type | Default | Description |
| ----- | -------- | ------- | ------------------------------------------------ |
| `min` | `number` | `0` | Minimum value of the slider |
| `max` | `number` | `100` | Maximum value of the slider |
Note: The component sets `thumbAlignment="edge"` by default, which aligns thumbs to the edge of the track rather than centering them.
### SliderValue
Displays the current value. Styled wrapper for `Slider.Value` from Base UI.
## Examples
For accessible labelling and validation, prefer using the `Field` component to wrap checkboxes. See the related example: [Slider field](/ui/docs/components/field#slider-field).
### With Label and Value
### Range Slider
### Vertical
### Form Integration