Forms
Navigation & layout
Data display & feedback
Date & time
Browse components
← All components
Color Slider
Slider for a single color channel. Use inside ColorPicker.
Install
npx shadcn@latest add https://ui.anuragroy.dev/r/color-slider.jsonPreview
Loading preview…
Installation
Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.
Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/color-slider.jsonGitHub fallback if the website is down:
Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/color-slider.jsonUsage
Import paths follow your components.json aliases. After install, the default path is @/components/ui/color-slider.
Import
import { ColorSlider } from "@/components/ui/color-slider"example.tsx
import { ColorPicker } from "@/components/ui/color-picker"import { ColorSlider } from "@/components/ui/color-slider"export function Example() { return ( <ColorPicker defaultValue="#3b82f6"> <ColorSlider colorSpace="hsb" channel="hue" label="Hue" showValue /> </ColorPicker> )}API Reference
ColorSlider
| Prop | Type | Default |
|---|---|---|
| channel | ColorChannel | — |
| colorSpace | ColorSpace | — |
| label | React.ReactNode | — |
| showValue | boolean | — |