# ColorPicker (@salmonui/inputs/color-picker)

> The ColorPicker component of @salmonui/inputs/color-picker: Color picker: a trigger button with a swatch preview that opens a popover, or an inline panel. The panel composes the parts: ColorArea, hue and alpha ColorSliders and a ColorField (mode 'area'), or a ColorSwatchPicker (mode 'swatches'), recent colors and Apply / Cancel. The popover is a role="dialog" that takes focus on open and returns it to the trigger on close. A hidden input with name submits the value.

Canonical: https://salmonui.dev/docs/reference/inputs/color-picker/ColorPicker

```ts
import { ColorPicker } from '@salmonui/inputs/color-picker';
```

Entry index: https://salmonui.dev/docs/reference/inputs/color-picker (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/inputs/color-picker.md).

## Reference

Kind: component

```ts
function ColorPicker(props: ColorPickerProps): ReactNode;
```

Color picker: a trigger button with
a swatch preview that opens a popover, or an inline panel. The panel
composes the parts: `ColorArea`, hue and alpha `ColorSlider`s and a
`ColorField` (mode `'area'`), or a `ColorSwatchPicker` (mode
`'swatches'`), recent colors and Apply / Cancel. The popover is a
`role="dialog"` that takes focus on open and returns it to the trigger
on close. A hidden input with `name` submits the value.

Props: [`ColorPickerProps`](https://salmonui.dev/docs/reference/inputs/color-picker/ColorPickerProps) (its members are the props)
