# Shadcn Color

> Color input

- Type: example, free and open source (MIT)
- Component: [Input](https://reui.io/components/input.md)
- Page: https://reui.io/components/input/c-input-28
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/input.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/input.md
- MCP: `get_example("c-input-28")`
- Registry item: https://reui.io/r/styles/base-nova/c-input-28.json
- Uses: Field, Input

## Best for

A browser color swatch that opens the native picker, starting from a blue hex value

## When not to use

- Opacity, preset swatches or oklch and hsl values in a themed popover: use [Color Picker](https://reui.io/components/color-picker.md) (`get_component("color-picker")`)

## Install

```bash
npx shadcn@latest add @reui/c-input-28
```

## About Shadcn Input

### When to use

- Labeled text, email and search fields, plain or restyled as a pill, an underline or borderless
- Native typed fields for passwords, phones, URLs, numbers, dates, times, files, colors and ranges
- Field states and hints: disabled, required or optional marks, errors, character counts and password strength

### When not to use

- Icons, buttons, units or a prefix that sit inside the border of the box: use [Input Group](https://reui.io/components/input-group.md) (`get_component("input-group")`)
- International numbers chosen by country flag and formatted as the user types: use [Phone Input](https://reui.io/components/phone-input.md) (`get_component("phone-input")`)
- A whole create or edit page that gathers many fields under one save action: use the [Form blocks](https://reui.io/blocks/application/form.md)

### Agent notes

- The red invalid border comes from `aria-invalid` on `Input` in every style; `FieldError` only prints the message

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
