HEEx
<ConnieUI.Colors.color_input field={@field} presets={@presets} />
Controls
Set by the example
field presets
Docs
A color input with optional presets and a custom color dropdown.
## Examples
<ConnieUI.Colors.color_input
field={f[:brand_color]}
presets={[{"Blue", "#1570EF"}, {"Green", "#099250"}]}
/>
| Attribute | Type | Default | Description |
|---|---|---|---|
| No data found. | |||
| field * | {:struct, Phoenix.HTML.FormField} |
|
|
| presets | :list | [] |
List of {name, hex_color} tuples
|
| default | :string | nil |
Color shown in the swatch when the field has no value
|