Mermaid Zoom

by xiaozhuang0433
5
4
3
2
1
Score: 50/100

Description

Category: Data Visualization

The Mermaid Zoom plugin adds zoom, pan and resize controls to Mermaid diagrams with separate handling for inline and fullscreen views. It wraps each rendered diagram in a resizable container, supports click and drag panning, pinch to zoom on mobile and quick controls for zooming in, zooming out, reset and fullscreen. Wheel zoom is opt in for each inline diagram so page scrolling still works normally, while fullscreen mode keeps wheel zoom active. The plugin also shows the current zoom level, lets you set a default zoom percentage from 50% to 300% for newly rendered diagrams and caches original SVG dimensions so reset and resize behaviour stays consistent. Zoom range runs from 10% to 500%.

Reviews

No reviews yet.

Stats

29
stars
10,037
downloads
5
forks
54
days
26
days
26
days
6
total PRs
1
open PRs
0
closed PRs
5
merged PRs
7
total issues
0
open issues
7
closed issues
79
commits

README file from

Github

Mermaid Zoom

English | 简体中文

An Obsidian plugin that adds zoom and pan functionality to Mermaid diagrams.

Version License

Features

  • Mouse Wheel Zoom - Opt-in wheel zoom via a per-diagram toggle (off by default, so the page still scrolls normally)
  • Drag to Pan - Click and drag to move around your diagrams
  • Touch Gestures - Pinch to zoom and drag to pan on mobile devices
  • Control Buttons - Quick access to zoom in, zoom out, and reset buttons
  • Scale Indicator - Real-time display of current zoom level
  • Fullscreen Mode - Open diagrams in a modal for better viewing
  • Resizable Containers - Drag the edges or corners of any diagram to resize its container

Installation

Obsidian Plugin Market (Coming Soon)

Once approved, install directly from Obsidian's community plugins browser.

Manual Installation

  1. Download the latest release from GitHub Releases
  2. Extract to your vault's plugins directory:
    your-vault/.obsidian/plugins/mermaid-zoom
    
  3. Enable the plugin in Obsidian:
    • Settings → Community Plugins
    • Find "Mermaid Zoom" and enable it

Usage

Mouse Controls

Action Description
Zoom Enable the Wheel zoom toggle on a diagram, then scroll the wheel over it
Pan Click and drag to move the diagram
Resize Drag an edge or corner of the diagram container
Fullscreen Click the fullscreen button to open in modal view

Touch Controls (Mobile)

Action Description
Zoom Pinch with two fingers
Pan Drag with one finger

Control Buttons

Located in the bottom-right corner of each diagram:

  • Wheel zoom toggle - Enable wheel-to-zoom for this diagram (off by default)
  • + - Zoom in
  • - - Zoom out
  • ⟲ - Reset to fit
  • ⛶ - Toggle fullscreen

Development

# Install dependencies
npm install

# Development mode (watch for changes)
npm run dev

# Production build
npm run build

Settings

The plugin provides the following settings in Obsidian's plugin settings:

  • Default zoom level — Initial zoom percentage when a diagram is rendered (50–300%, default 100%). Set it higher (e.g., 150%) if you prefer diagrams to appear larger without zooming in manually each time. Note: changes only apply to newly rendered diagrams; reload the note to see the effect.

How It Works

The plugin automatically detects all Mermaid diagrams rendered in Obsidian and wraps each one in a zoomable, resizable container. Each container can be resized by dragging its edges or corners. Zoom range is from 10% to 500%.

Wheel zoom is off by default in the inline view (so the page scrolls normally); enable it per diagram with the Wheel zoom toggle. In the fullscreen modal, wheel zoom is always active.

Original SVG dimensions are cached to ensure consistent scaling behavior when resetting or resizing.

License

MIT © Wang Xiao Zhuang

Support

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Mermaid Tools
4 years ago by dartungar
Tools for improved Mermaid.js experience in Obsidian.md
Diagrams
5 years ago by Sam Greenhalgh
Draw.io plugin for obsidian.md
Mousewheel Image zoom
5 years ago by Nico Jeske
An Obsidian plugin that enables you to increase/decrease the size of an image by holding down a configurable key (defaults to left alt), hovering over an image in preview mode and scrolling.
Image Toolkit
5 years ago by sissilab
An Obsidian plugin for viewing an image.
Zoom
5 years ago by Viacheslav Slinko
Typewriter Mode
3 months ago by davisriedel
Typewriter Mode is a plugin that adds typewriter scrolling (current line stays at a fixed position on the screen), a highlight for the current line, dimming of unfocused paragraphs and more to Obsidian.
TikZJax
4 years ago by artisticat1
Render LaTeX and TikZ diagrams in your notes
draw.io
4 months ago by somesanity
A plugin for Obsidian that integrates the draw.io editor into Obsidian.
Fullscreen Focus Mode
6 years ago by Razum
Diagrams.Net
4 years ago by Jens M Gleditsch
This repository contains a plugin for Obsidian for inserting and editing diagrams.net (previously draw.io) diagrams.
Mehrmaid
2 years ago by huterguier
Rendering Obsidian Markdown inside Mermaid diagrams.
Excalidraw Extras
4 months ago by zsviczian
Companion Obsidian.md plugin hosting extra add-on optional features for the main Excalidraw-Obsidian plugin
Wechat Converter
3 months ago by davidlam-oss
Obsidian 公众号排版(支持自定义 CSS和公众号贴图)、飞书云同步与多平台(小红书、知乎等)发布插件。Markdown 转微信文章 / Feishu docs / 知乎、小红书、今日头条等草稿,支持数学公式、本地图片、GIF 和 Mermaid。
Pixel Perfect Image
2 years ago by Johan Sanneblad
Pixel perfect 100% image resizing, copy to clipboard, show image in Finder/Explorer, and much more.
Mermaid Popup
2 years ago by ChenPengyuan
D2
4 years ago by Terrastruct
The official D2 plugin for Obsidian. D2 is a modern diagram scripting language thats turns text to diagrams.
Mermaid Themes
3 years ago by jvsteiner
mermaid themes for obsidian
Kroki
5 years ago by Greg Zuro
Media Viewer
2 years ago by Devon22
View and manage media files within your notes.
Nomnoml Diagram
5 years ago by Daeik Kim
Obsidian Plugin for nomnoml diagram
Export Graph View
2 years ago by Sean McGhee
Plugin to export your vault's graph view.
Image Tools
2 years ago by Andrey Serov
MoreDraw
2 years ago by webceoboy2011
mordraw.com for obsidian plugin
Reset Font Size
5 years ago by luckman212
Plugin for Obsidian that adds shortcuts for resetting the font size (zoom level).
WaveDrom
5 years ago by Alex Stewart
Adamantine Pick
4 years ago by Urist McMiner
Embeddable Pikchr(https://pikchr.org) diagrams renderer plugin for Obsidian(https://obsidian.md)
Full Screen Toggle
3 years ago by Donkey Pacific
Fullscreen toggle plugin across all platforms for Obsidian.
Mermaid Icons
8 months ago by toshs
Obsidian plugin enabling the use of icons in Mermaid diagrams.
Flowcharts
2 years ago by land0r
Flowchart Plugin for Obsidian – Create and customize flowcharts seamlessly within your Obsidian vault. Powered by Flowchart.js and designed for productivity
Status Bar Clock
8 months ago by Marty Ballard
Status Bar Clock for Obsidian
Graphic Organizer
6 months ago by Nick Le Guillou - Superhuman Curiosity
Sankey
2 years ago by Finn Romaneessen
An Obsidian plugin to create sankey diagrams
Tabsdown
2 months ago by grafanakibana
Create accessible, theme-native tabbed blocks for Markdown-renderable content in Obsidian.
TableTune
a month ago by niizhou
Tune your Obsidian tables: drag column/row borders to resize; sizes remembered per table; content-aware defaults; clean single-scrollbar reading view.
Pintora
2 years ago by Amias Lee
Create Pintora diagrams directly in the Obsidian.
Inline TikZ
2 months ago by Lachlan Harris
Render seamless Tikz, CircuiTikz & other PGFPlots LaTeX diagrams directly in your notes.
GoBoard
8 months ago by Dmitry I. Sokolov
Obsidian plugin for rendering Go game diagrams from markdown code blocks
ICOR for Life - Interface
a month ago by Paperless Movement S.L.
The vault's chrome in one place: hide the ribbon and Obsidian's own controls, and give any folder a colour, an icon and a label. Writes no CSS; the INKLINE theme draws it. Part of the ICOR for Life suite.
Mermaid Link Navigator
12 days ago by w-java123