# Color Slider

> Slider for a single color channel. Use inside ColorPicker.

Registry name: `color-slider`. HTML docs: https://ui.anuragroy.dev/component/color-slider.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/color-slider.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/color-slider.json`.

Registry JSON: https://ui.anuragroy.dev/r/color-slider.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/color-slider.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import { ColorSlider } from "@/components/ui/color-slider"
```

## Usage

```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

### ColorSlider

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `channel` | ColorChannel | — |  |
| `colorSpace` | ColorSpace | — |  |
| `label` | React.ReactNode | — |  |
| `showValue` | boolean | — |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/color-slider): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/color-slider.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
