Skip to content

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.json

Preview

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.json

GitHub 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.json

Usage

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

PropTypeDefault
channelColorChannel—
colorSpaceColorSpace—
labelReact.ReactNode—
showValueboolean—