DocMosaicdocs
Primitives

Editor.AddImageButton

Toolbar button that opens a file picker and inserts a new image section.

Toolbar button that opens a file picker and inserts a new image section.

Usage

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

<Editor.Root>
    <Editor.AddImageButton />
</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 icon-only button variant. Defaults to 'caramel'.

classNamestring | undefined-

Extra classes merged onto the icon-only button.

  • Root - the orchestrator