1. Context Components
  2. Mermaid Diagrams

Use a fenced code block with the mermaid language. The renderer turns it into a diagram with zoom controls; you do not need to import a component.

​
Example

Rendering diagram…

Copy this Markdown into your page:

```mermaid
flowchart LR
  A[Edit pages] --> B[Preview locally]
  B --> C[Review changes]
  C --> D[Publish]
```

​
Rendering limits

  • Keep diagrams under 12,000 characters and at most 150 edges.
  • Use plain labels; HTML, initialization directives, frontmatter, click links and remote images are not supported.
  • Diagrams render in an isolated frame. Use the minus, percentage and plus controls to adjust zoom between 50% and 200%.
  • Invalid syntax or unsupported content displays a message instead of a diagram.

Use fenced mermaid syntax, not a raw <Mermaid> tag. Put a written explanation near complex diagrams so readers can understand the flow without relying on the image.

​
Desktop example

Diagram from Edit pages through Preview, Review and Publish, with zoom controls

Fenced Mermaid code renders as a diagram with zoom controls.