HeadlinesBriefing favicon HeadlinesBriefing.com

Beautiful Mermaid renders fast, themed diagrams

Hacker News: Front Page •
×

beautiful-mermaid is a new TypeScript library for rendering Mermaid diagrams as SVGs or ASCII art. It supports five diagram types including flowcharts and sequence diagrams. Built for speed and zero DOM dependencies, it renders 100+ diagrams in under 500ms.

The library solves common pain points with Mermaid’s default renderer. It simplifies theming with just two base colors and optional enrichments. There are 15 built-in themes, plus full compatibility with Shiki for importing VS Code themes directly.

Its terminal-friendly ASCII output makes it ideal for CLI tools and AI-assisted coding workflows. The live theme switching via CSS custom properties allows dynamic UI updates without re-rendering. This tool targets developers building documentation, visual aids, or agent-based tooling.

Key features include mono mode for minimal color setups, dual output formats, and ultra-fast performance. It’s especially useful in environments where lightweight, customizable visuals are needed. The project is open-source and gaining traction among developer tool enthusiasts on GitHub.