Slider
An input control for selecting a numeric value from a range by dragging a thumb along a track.
ui@radix-ui/react-sliderclass-variance-authority
Installation
$npx futureuikit add slider
Import
import { Slider } from "@/components/ui/slider"
Layout Variant
Color Theme
Shape
Thumb Size
Track Spacing
Named Keys & Props
Pass these exact named keys as props on <Slider />. Click any color pill to copy the prop.
colorDefault is "default"(Black & White)variantVisual style"solid""outline""ghost""glass""elevated""soft"shapeCorner shape"default""square""rounded""sharp"spacingInner spacing"default""2x""4x""6x""8x"sizeComponent size"default""sm""md""lg""xl"Usage Example
A basic implementation example to get you started.
Example Implementation
import { Slider } from "@/components/ui/slider";
export default function Example() {
return <Slider defaultValue={[50]} max={100} step={1} />;
}Features
Key capabilities and highlights.
Key Capabilities
- ◆Supports min, max, step, and default value configuration.
- ◆Accessible with full keyboard and screen-reader support.
- ◆Built on Radix UI Slider primitive.
Notes
Important implementation details to consider.
Implementation Details
- ◆Install: Run 'npx futureuikit add slider'.
- ◆Import: 'import { Slider } from "@/components/ui/slider";'
- ◆Usage: Set defaultValue, max, and step props to configure the slider range.