Color field

A color field picks one colour: a swatch that opens the native picker, the colour's name and where it is used, and its hex code as text.

Previewapps/web/components/ui/KbColorField.tsx

Valid and invalid

Buttons and highlights
Show code
<KbColorField label="Brand colour" hint="Buttons and highlights" value="#1a202b" onChange={set} />
Use a hex code like #1a202b.
Show code
<KbColorField label="Links" value="#12" onChange={set} />