BenixBenix DSv1.1.0

ColorPicker

Color picker with palette and hex input. Powered by react-colorful (optional peer).

Examples

With label

Selected: #0084FF

const [color, setColor] = useState('#0084FF');
<ColorPicker label="Brand color" required value={color} onChange={setColor} />

API Reference

Props of the ColorPicker component.

PropTypeDefaultDescription
value*stringHex color.
onChange*(value: string) => void
labelstring
requiredbooleanfalse
helperTextstring
disabledbooleanfalse