# color-picker

- 分组：高级 / 可选能力（Advanced / Optional）
- 页面：/components/color-picker
- 源码：packages/react/src/components/color-picker.tsx

## 导出

```ts
import { ColorPicker } from "@modra/react";
```

## Props（ColorPickerProps）

| 名称 | 必填 | 类型 | 说明 |
| --- | --- | --- | --- |
| `value` | 否 | `string` |  |
| `defaultValue` | 否 | `string` |  |
| `onValueChange` | 否 | `(value: string \| undefined) => void` |  |
| `format` | 否 | `ColorFormat` |  |
| `presets` | 否 | `ColorPreset[]` |  |
| `recentColors` | 否 | `string[]` | Previously selected colors, ordered from newest to oldest. |
| `defaultRecentColors` | 否 | `string[]` |  |
| `onRecentColorsChange` | 否 | `(colors: string[]) => void` |  |
| `maxRecentColors` | 否 | `number` |  |
| `allowEyeDropper` | 否 | `boolean` | Show the native screen color sampler when the browser exposes EyeDropper. |
| `allowClear` | 否 | `boolean` |  |
| `showText` | 否 | `boolean` |  |
| `open` | 否 | `boolean` |  |
| `onOpenChange` | 否 | `(open: boolean) => void` |  |
| `className` | 否 | `string` |  |
| `children` | 否 | `React.ReactNode` |  |
| `disabled` | 否 | `boolean` |  |
