Demos

Six demos, one idea each. All run the real pele package in your browser; most run Mermaid.js beside it on the same text.

  1. Demo 1TypingBoth libraries redraw on every keystroke. Compare the times.
  2. Demo 2StreamingA diagram redrawn on each chunk of an AI answer.
  3. Demo 3ThemingChange CSS variables. Pele recolours without a redraw.
  4. Demo 4Narrow screensResize the viewport. Pele changes the layout; Mermaid.js scales the drawing.
  5. Demo 5200 diagrams on one pageHow long each library takes to draw a long documentation page.
  6. Demo 6Untrusted inputScripts, bad links and oversized diagrams, and what reaches the page.

How the timings are taken

Both libraries are fully downloaded before a timing starts, both render the same Mermaid text, and times are measured with performance.now() in your own browser. Pele's numbers are the median of recent renders, after a few warm-up renders, which is what an editor sees once you've been typing for a second. Mermaid.js uses its default settings with securityLevel: 'strict'.