DocMosaicdocs
Primitives

Editor.TemplateGallery

Modal grid of starter templates.

Modal grid of starter templates.

Usage

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

<Editor.Root>
    <Editor.TemplateGallery />
</Editor.Root>;

API Reference

PropTypeDefaultDescription
templates *readonly TemplateGalleryItem[]-

Templates to render

  • order is preserved.
onTemplateSelected((template: TemplateGalleryItem) => void) | undefined-

Fired after the template has been applied via the editor's UPDATE_DOCUMENT action. Useful for analytics or closing a dialog.

classNamestring | undefined-

Optional className wrapping the gallery grid.

  • Root - the orchestrator