Skip to main content
AdOpenFree logoPromote your productReach more potential users and drive product growth and revenue.Advertise
Favicon of Pele

Pele

Free Listing

Pele is a lightweight open source library that renders Mermaid diagrams to SVG and themes them with CSS variables. It supports every diagram type built into Mermaid 12.1.0, has no runtime dependencies, and adapts layouts for small screens.

Visit obsidianmd/pele

Overview

Pele is a lightweight open source library developed for Obsidian that renders Mermaid diagrams to SVG. It is synchronous, has no runtime dependencies, and uses CSS variables for colors and fonts. Pele supports every diagram type built into Mermaid 12.1.0.

Key Features

  • Renders Mermaid syntax to SVG and supports every diagram type built into Mermaid 12.1.0.
  • Themes diagrams with CSS variables for colors and fonts; color changes apply without re-rendering.
  • Has zero runtime dependencies and a 230 kB gzip bundle, compared with 1.6 MB for Mermaid.js.
  • Adapts diagram layout to small screens and container width when mounted in a browser.
  • Provides render(), mount(), renderAsync(), and individual diagram registration for bundle control.
  • Escapes diagram text, filters links and styles, and limits source and output size.

Use Cases

  • Render Mermaid diagrams in web apps by passing Mermaid syntax to render() and inserting the returned SVG.
  • Mount diagrams into browser elements with mount(), which reads fonts from CSS and adapts layout to container width.
  • Match an application or editor theme by setting CSS variables on the diagram or a parent element.
  • Render diagrams quickly in Obsidian and match the app theme.

Getting Started

  • Install Pele with npm install pele, pnpm add pele, yarn add pele, or bun add pele.
  • Alternatively, load the browser build from a CDN with a script tag.
  • Import render from pele, pass Mermaid syntax to render(), and insert the returned svg into the page.
  • In a browser, use mount() to render into an element, read fonts from CSS, and adapt layout to the container width.

Deployment & Requirements

  • Install from npm, pnpm, yarn, or bun, or load Pele from a CDN in the browser.
  • The library has no runtime dependencies.

Before You Adopt

  • License: Other. Review its terms before using, modifying, or distributing the project.
  • Pele targets Mermaid 12.1.0 syntax but uses its own layout and visual style, so output may differ from Mermaid.js.
  • Handling untrusted diagrams requires following Pele's security guidance for errors and icons.

Comments

Sign in to leave a comment.

More like Pele

Favicon of Solid Glass

Solid Glass

Free ListingStars: 2.1K

A tactile, physical design system for AI applications.

App UI & SDKs

Solid Glass is a design system for AI applications with a refined glass-inspired aesthetic: thick, smoky panes, fine borders, soft shadows, and restrained finishes that keep interfaces readable while adding depth and materiality.

Favicon of Free My TV

Free My TV

Free ListingStars: 3.1K

A fast, ad-free TV home screen

App UI & SDKs

Free My TV is an open-source, ad-free home screen for Google TV, Android TV, LG and Samsung TVs, with trending picks, weather and a one-button return to the stock launcher.