DocMosaicdocs
Primitives

Editor.DrawButton

Toolbar toggle that enters drawing mode.

Toolbar toggle that enters drawing mode.

Usage

import { Editor } from '@docmosaic/react';

<Editor.Root>
    <Editor.DrawButton />
</Editor.Root>;

API Reference

PropTypeDefaultDescription
iconOnlyboolean | 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-drawing) icon-only variant. Defaults to 'caramel'.

activeVariant"default" | "cream" | "sage" | "orange" | "caramel" | "white" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined-

Override the active (drawing) icon-only variant. Defaults to 'orange'.

classNamestring | undefined-

Extra classes merged onto the icon-only button while idle.

activeClassNamestring | undefined-

Extra classes merged onto the icon-only button while drawing is active.

  • Root - the orchestrator