# Color input

A hex colour with a swatch.

Import from `@a31labs/rax/color-input`.

## Usage

```tsx
<Field label="Accent"><ColorInput value={hex} onValueChange={setHex} /></Field>
```

## Rules

Props: `value` (`#rrggbb`), `onValueChange`, `allowEmpty`, plus native input props for the hex field (use `aria-label` or Field). A native colour swatch labelled "Pick colour" sits beside a mono hex Input, and the two stay in sync. Typing `#rgb` or `#rrggbb` emits lowercase `#rrggbb`; partial text waits, and invalid text reverts on blur. An empty value is allowed only with `allowEmpty`.

Page: https://rax.a31.at/components/color-input
