ColorPicker

A color selection component with palette and input support.

tsx
import { ColorPicker } from '@xdev-asia/x-ui-react';
tsx
const [color, setColor] = useState('#3b82f6');

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

Props

  • value - Current color value
  • onChange - Color change callback
  • format - 'hex' | 'rgb' | 'hsl'
  • presets - Preset color palette