Primitives
Editor.ColorPicker
Drawing-mode color swatch grid for stroke color.
Drawing-mode color swatch grid for stroke color.
Usage
import { Editor } from '@docmosaic/react';
<Editor.Root>
<Editor.ColorPicker />
</Editor.Root>;API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value * | string | - | Currently-selected color (CSS color string). |
| onChange * | (color: string) => void | - | Fired when the user picks a swatch or commits a custom color. |
| presets | readonly string[] | undefined | - | Optional override for the swatch palette. Defaults to DEFAULT_COLOR_PRESETS (12 colors). |
| className | string | undefined | - | - |
| disabled | boolean | undefined | - | When |
Related
- Root - the orchestrator