Primitives
Editor.ShapeToolButton
Toolbar toggle that arms the draw-to-size shape tool (rectangle, circle, line).
Toolbar toggle that arms the draw-to-size shape tool. While armed, dragging on the page rubber-bands a new ShapeSection; a small caret picks the primitive (rectangle, circle, or line). Mutually exclusive with the frame, image-frame, and drawing tools, and it renders in its active variant while armed.
Usage
import { Editor } from '@docmosaic/react';
<Editor.Root>
<Editor.ShapeToolButton />
</Editor.Root>;API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| iconOnly | boolean | undefined | - | Render a compact icon-only square button with an accessible label. |
| variant | "default" | "cream" | "sage" | "orange" | "caramel" | "white" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined | - | Override the idle (not-armed) variant. Defaults to |
| activeVariant | "default" | "cream" | "sage" | "orange" | "caramel" | "white" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined | - | Override the armed (drawing) variant. Defaults to |
| className | string | undefined | - | Extra classes merged onto the toggle button while idle. |
| activeClassName | string | undefined | - | Extra classes merged onto the toggle button while the tool is armed. |
Related
- Editor.SelectToolButton - return to select / move mode
- Editor.FrameToolButton - container frames