• Stars
    star
    175
  • Rank 210,926 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 1 year ago
  • Updated 11 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate Excalidraw diagrams from Mermaid

mermaid-to-excalidraw

Convert mermaid diagrams to excalidraw

Set up

Install packages:

yarn

Start development playground:

yarn start

Build command:

yarn build

Get started

Example code:

import { parseMermaidToExcalidraw } from "@excalidraw/mermaid-to-excalidraw";

try {
  const { elements, files } = await parseMermaid(diagramDefinition, {
    fontSize: DEFAULT_FONT_SIZE,
  });
  // Render elements and files on Excalidraw
} catch (e) {
  // Parse error, displaying error message to users
}

Playground

Try out here.

API

Head over to the docs.

Support new Diagram type

Head over to the docs.