Passer au contenu principal
ColorPicker
ImplementedPer-event brand color picker — a controlled native color input with an optional preset palette row. Replaces legacy color-picker.xsl. API under revision: preset palette rendering and keyboard navigation are not yet implemented.
Categorymolecules
Source
patterns/molecules/colorpicker.htmlAI HintControlled native color input with an optional preset row. API under revision — preset rendering and keyboard navigation are not implemented yet; verify against the rewrite before adopting.
ColorPicker component.
ColorPicker
design-system
ColorPicker component preview and API reference.
Props
Preview
ColorPicker
Prop
Type
Required
Default
Description
valuestringOptional
—Selected color (hex)
onChange(color: string) => voidOptional
—Color change handler
disabledbooleanOptional
falseDisabled state
labelstringOptional
—Field label
presetColorsstring[]Optional
—Preset color swatches
ariaLabelstringOptional
—Accessible name for the input and preset listbox; falls back to label, then 'Pick a color'.
classNamestringOptional
—Class appended to the root container.
idstringOptional
—Id for the native color input.
Quick use:
<ColorPicker />Accessibility
ARIA rolelistbox
a11y
1 ruleARIA
1 ruleUsage
Import
tsxSnippet
import { ColorPicker } from "@epasslive/design-system"Example 1
tsxSnippet
<ColorPicker value={color} onChange={setColor} ariaLabel="Brand color" />Anti-patterns
— Do not hardcode data in molecules
— Avoid complex business logic in molecules