Command Menu

Search documentation, components, and switch theme.

Atoms

Slider

A range slider input.

shadcn/ui
Docs

Installation#

npx shadcn@latest add @formance/slider

Install the following dependencies:

npm install radix-ui

Copy and paste the following code into your project.

Update the import paths to match your project setup.

Usage#

import { Slider } from '@/components/ui/slider'
<Slider defaultValue={[50]} max={100} step={1} />

Examples#

Range#

Use two values to create a range slider.