# Inline color panel

> Saturation area, hue and opacity sliders, format fields and preset swatches rendered in place.

A shadcn/ui block from the [@reui](https://reui.io) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/reui/c-color-picker-1).

- Page, with a live preview: https://shadcn.exchange/r/reui/c-color-picker-1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-color-picker-1-light-2a6b575237e1fa31.png
- Registry item: https://reui.io/r/new-york-v4/c-color-picker-1.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://reui.io/r/new-york-v4/c-color-picker-1.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `card`, `@reui/color-picker`

## Files

### `c-color-picker-1.tsx`

```tsx
"use client"

import { useState } from "react"
import {
  ColorPicker,
  ColorPickerPanel,
} from "@/components/reui/color-picker"

import { Card, CardContent } from "@/components/ui/card"

const SWATCHES = [
  "#ef4444",
  "#f97316",
  "#eab308",
  "#22c55e",
  "#06b6d4",
  "#3b82f6",
  "#8b5cf6",
  "#ec4899",
]

export function Pattern() {
  const [value, setValue] = useState<string | null>("#6366f1")

  return (
    <Card className="w-full max-w-96">
      <CardContent>
        {/* `alpha` adds the opacity slider and field; `swatches` adds the
            presets row under the default panel. */}
        <ColorPicker
          value={value}
          onValueChange={setValue}
          alpha
          swatches={SWATCHES}
          aria-label="Fill color"
        >
          <ColorPickerPanel />
        </ColorPicker>
      </CardContent>
    </Card>
  )
}
```
