Put the format Select before or after the fields.
brand-color.tsx
ColorFormatField
<fieldset>| Prop | Type | Default | Description |
|---|---|---|---|
| disabled | boolean | false | Turns off the control: no focus, no edits, and the disabled look. |
| name | string | — | The form name: the form gets the color as hex (#RRGGBB, or #RRGGBBAA with alpha). |
| read | boolean | false | The user can focus and read the value, but cannot change it. |
| invalid | boolean | false | Shows the invalid look and sets aria-invalid. |
| value | string | Color | — | The color (controlled): a string ("#6E56CF", "hsl(250, 55%, 57%)") or a React Aria Color. |
| default | string | Color | — | The color at first (uncontrolled). Default #000000, or the color of a ColorPicker around it. |
| on | — | Runs on each committed change (blur, Enter, arrow keys), with the new Color. | |
| color | "hex""hsb""hsl""rgb" | — | The format (controlled): hex, rgb, hsl, or hsb. |
| default | "hex""hsb""hsl""rgb" | "hex" | The format at first (uncontrolled). Default hex. |
| on | — | Runs when people pick another format. The color stays the same. | |
| alpha | boolean | false | Adds an alpha field (0% to 100%) after the other fields. |
| labels | — | The words (COLOR_FORMAT_FIELD_LABELS), to translate them. Keep the object stable. | |
| ...props | <fieldset> attributes | — | Every other attribute goes to the <fieldset>, with a ref. |
ColorFormatFieldFormat
<button>| Prop | Type | Default | Description | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | |||||||||||||||||||||||
| size | "default""lg""sm" | — | |||||||||||||||||||||||
| content | Omit<SelectContentProps, "children"> | — | Props of the format list (SelectContent): container, side, align, className... | ||||||||||||||||||||||
| item | — | Props of the row of each format (SelectItem), and any data-* attribute. | |||||||||||||||||||||||
From Base UISelect.TriggerBase UI docs | |||||||||||||||||||||||||
| disabled | boolean | — | Whether the component should ignore user interaction. | ||||||||||||||||||||||
| default | boolean | false | Whether the select popup is initially open. To render a controlled select popup, use the open prop instead. | ||||||||||||||||||||||
| on | — | Event handler called when the select popup is opened or closed. | |||||||||||||||||||||||
| |||||||||||||||||||||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||||||||||||||||||||
ColorFormatFieldInputs
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| size | "default""lg""sm" | "default" | The height of each field: sm 28, default 32, lg 36. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
ColorFormatFieldError
<p>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <p> attributes | — | Every other attribute goes to the <p>, with a ref. |
| Tab | Moves between the Select and the fields. |
|---|---|
| Up ArroworDown Arrow | Changes the value of the focused channel field one step. |
| Enter | Commits the typed value. |
Built with
Installs with Color Format Field
- Components
- Color Field,Input Group,Select











