Slider
Accessible range input for numeric adjustments with glassmorphism styling.
36px
Installation
npx @glass-ui-kit/cli add sliderUsage
Examples
Sizes
Use the size prop for the standard slider scale. md is the default.
Small20%
Medium45%
Large70%
Variants
Use variant to match the control surface with the surrounding UI.
default20%
soft40%
strong60%
transparent80%
Styling
Slider follows the same prop-first pattern as the other form controls. Reach for variant and size first, then use className as an escape hatch.
API Reference
Accepts all Radix Slider.Root props.
| Prop | Type |
|---|---|
variant | "default" | "soft" | "strong" | "transparent" |
size | "sm" | "md" | "lg" |
value | number[] |
defaultValue | number[] |
onValueChange | (value: number[]) => void |
min | number |
max | number |
step | number |
disabled | boolean |
className | string |