UIInternal UI

Primitives

ColorPicker

@randall-enterprises/ui/components/primitives/color-picker

Batteries-included color popover. The drop-in replacement for <input type=color>.

Props (7)

valuestring
defaultValuestringColour the picker opens on when `value` is unset.
onChange(value: string) => void
footerReactNodeRendered under the picker — a "Clear" action, presets, and so on.
alignComponentProps<typeof PopoverContent>["align"]
swatchClassNamestring
recentsKeystring`localStorage` key for the recent-colours row. Omit it and no history is
Click the swatch to open the picker.