GithubX

Slider

Pick a value from within a given range.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
o

## installation

pnpm dlx shadcn@latest add https://ascii.cnlibs.com/r/slider.json

## usage

import { Slider } from "@/components/ui/slider";
<Slider defaultValue={40} />

## controlled

Drive the value from state with value / onValueChange.

8
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
o

## stepped

step snaps the thumb to multiples of a value.

4
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
o

## narrow track

chWidth sets the track length in characters.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
o

## disabled

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
o