MindeesUI
ComponentsSpecialised

ColorPicker

A zero-dependency swatch grid for selecting a hex colour from a small palette.

ColorPicker is a minimum-deps swatch picker — no peer installation required. It renders a wrapping row of round, pressable swatches and reports the chosen hex string through onChange. For a full hue wheel, consume the optional peer @thebylito/react-native-wheel-color-picker directly.

Import

import { ColorPicker } from '@mindees/ui';

Usage

const [color, setColor] = useState('#3b82f6');

<ColorPicker value={color} onChange={setColor} />;

Props

PropTypeDefaultDescription
valuestringCurrently selected hex colour. Matched against the swatch list.
onChange(next: string) => voidCalled with the hex of the pressed swatch.
swatchesreadonly string[]12-swatch default rampPalette of selectable hex strings.
sizenumber32Diameter of each swatch in dp.

Accessibility

Each swatch is a button labelled "Choose colour <hex>" and reports its picked state via accessibilityState.selected, so VoiceOver and TalkBack announce the active swatch correctly.

On this page