Skip to content

ColorPicker

Colour field: a swatch (or the child) opens the palette.

Group: Inputs · Kind: macro

value
empty
child · a status glyph
inline
open · the label palette

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-color-picker on Web
exponential-ui-color-picker on iOS
exponential-ui-color-picker on Android
exponential-ui-color-picker on Desktop
Prop Type Required Bindable Description
value string – yes Picked hex colour.
colors [string] – – Offered hexes; default the label palette.
open boolean – yes Grid shows; bind it. Default false.
inline boolean – – Grid only, no trigger. Default false.
  • on.change: runs an action

None.

one

No basic catalog component maps here.

Box · Button · Popover

Role: button

as IconPicker: the trigger (a child = a ghost button around it) is named Color: #hex, each swatch a toggle button named by its hex; inline = the swatches alone

Keys Action
As IconPicker; inline Tab moves through the swatches, Enter, Space picks

Recipe parts: ColorPicker/root ColorPicker/grid ColorPicker/swatch ColorPicker/fill ColorPicker/trigger ColorPicker/dot ColorPicker/customTrigger ColorPicker/content

Keyed by: selected :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover :warning :info

Themes · Write a theme

Button · Popover · Form · FieldGroup · FormActions · SettingsRow · Input · Textarea