# Color Input Group

> Hex and per-channel inputs. Use inside ColorPicker.

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

## Install

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

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

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

## Import

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

```tsx
import { ColorInputGroup } from "@/components/ui/color-input-group"
```

## Usage

```tsx
import { ColorInputGroup } from "@/components/ui/color-input-group"
import { ColorPicker } from "@/components/ui/color-picker"

export function Example() {
  return (
    <ColorPicker defaultValue="#3b82f6">
      <ColorInputGroup colorSpace="rgb" />
    </ColorPicker>
  )
}
```

## API

### ColorInputGroup

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `colorSpace` | ColorSpace | "rgb" |  |
| `withHex` | boolean | true |  |
| `withChannels` | boolean | true |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/color-input-group): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/color-input-group.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.
