Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Mermaid Preview for MarkdownNew to Visual Studio Code? Get it now.
Mermaid Preview for Markdown

Mermaid Preview for Markdown

pjrigali

|
4 installs
| (0) | Free
Renders ```mermaid fenced code blocks inside VS Code's built-in markdown preview.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mermaid Preview for Markdown

Renders Mermaid diagrams inside VS Code's built-in markdown preview. Just fence a code block with mermaid and open the preview.

```mermaid
flowchart LR
    A[Start] --> B{Decision}
    B -- Yes --> C[Do thing]
    B -- No  --> D[Skip]
```

Features

  • Inline rendering in the native markdown preview (no separate panel).
  • Auto theme: follows the active VS Code color theme (light/dark/high-contrast).
  • Configurable theme override and diagram max-width.

Settings

Setting Default Description
mermaidPreviewMd.theme auto One of auto, default, dark, forest, neutral.
mermaidPreviewMd.maxWidth 100% CSS max-width applied to rendered diagrams.

Development

npm install
npm run compile

Press F5 in VS Code to launch an Extension Development Host with the extension loaded.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft