Pele
A lightweight open source library that renders Mermaid diagrams to SVG, themed with CSS variables.
At a Glance
Pele is an open source library under the MIT license that renders Mermaid diagrams to SVG.
Engagement
Available On
Alternatives
Listed Oct 2026
About Pele
Pele is an open source JavaScript/TypeScript library that renders Mermaid diagram syntax to SVG. It was developed for Obsidian and is released under the MIT license. The project says it is synchronous, has no runtime dependencies, and supports every diagram type built into Mermaid 12.1.0.
What It Is
Pele takes Mermaid text and returns SVG that can be inserted into a page. It can be installed from npm or loaded from a CDN. In a browser, a mount function renders into an element, reads fonts from CSS, and adapts the layout to the container width. The project also provides a documentation site with examples and an in-browser playground.
Theming and Bundle Control
Colors and fonts are set with CSS variables such as background, foreground, line, surface, border and accent, plus series colors for charts. Color changes apply without re-rendering. The main entry point includes all diagram types, while a core entry lets developers register individual diagram types, and a lazy entry loads them on demand to reduce initial bundle size.
Compatibility and Security
Pele targets Mermaid 12.1.0 syntax with its own layout and visual style. The README says its parsers are tested against Mermaid's parser specs and with differential fuzzing. For security, it escapes diagram text, filters links and styles, and limits source and output size. The project site compares itself with Mermaid.js, claiming a smaller bundle, zero dependencies and faster render times.
Community Discussions
Be the first to start a conversation about Pele
Share your experience with Pele, ask questions, or help others learn from your insights.
Pricing
Open Source
Pele is an open source library under the MIT license that renders Mermaid diagrams to SVG.
- MIT license
- Zero dependencies
- Supports every diagram type built into Mermaid 12.1.0
- Themed with CSS variables
- Install via npm, pnpm, yarn, bun or CDN
Capabilities
Key Features
- Renders Mermaid diagrams to SVG
- Supports every diagram type in Mermaid 12.1.0
- Zero runtime dependencies
- Synchronous rendering
- Theming with CSS variables
- Responsive layout adaptation via mount()
- Modular diagram registration and lazy loading
- Escapes text, filters links and styles, and limits source and output size
- Online playground and examples
- CDN build available
