Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Supported Diagram Types

Pele ships with parsers for every diagram type in Mermaid 12.1.0. Detection is based on the first line of the diagram, so use the exact keywords below as the first token of your block.

Core diagram types

KeywordDiagram
graph, flowchartFlowchart (v2 layout)
flowchart-elkFlowchart with the ELK layout engine
sequenceDiagramSequence diagram
classDiagramClass diagram
stateDiagramState diagram (v2)
erDiagramEntity-relationship diagram
ganttGantt chart
piePie chart
gitGraphGit graph
journeyUser journey diagram
timelineTimeline
mindmapMindmap
quadrantChartQuadrant chart
requirementDiagramRequirements diagram
kanbanKanban board
sankey-beta / sankeySankey diagram
xychart-beta / xychartXY chart
block-beta / blockBlock diagram
packet-beta / packetPacket diagram
architectureArchitecture diagram
infoInfo diagram
treemapTreemap
ishikawaIshikawa (fishbone) diagram
eventmodelingEvent modeling diagram

Extended and beta types

KeywordDiagram
C4Context, C4Container, C4Component, C4Dynamic, C4DeploymentC4 (architecture) diagrams
agentflow-betaAgent flow
swimlane-betaSwimlane
treeView-betaTree view
radar-betaRadar chart
venn-betaVenn diagram
wardley-betaWardley map
cynefin-betaCynefin framework diagram
usecase-betaUse case diagram
railroad-beta, railroad-ebnf-beta, railroad-abnf-beta, railroad-peg-betaRailroad / syntax diagrams

Behavior on unknown input

  • If the first line does not match any known type, Pele falls back to parsing the text as ordinary Mermaid flowchart syntax (graph/flowchart).
  • Syntax errors raise a PeleError that reports the offending line, column, and a snippet pointing at the problem; in the browser this appears in the console and the diagram element is left as-is rather than replacing the page with a broken render.

Examples

A few of the more distinctive types:

mindmap
  root((Pele))
    Fast
    Small
    Mermaid compatible
      Flowcharts
      Sequence diagrams
gitGraph
   commit id: "a"
   commit id: "b"
   branch feature
   commit id: "c"
   checkout main
   merge feature
journey
    title Rendering a book diagram
    section Build
      mdbook runs preprocessor: 5: Me
      Preprocessor rewrites block: 4: Me
    section Read
      Browser loads page: 3: Reader
      Pele renders SVG: 5: Reader