Navigate and explore Mermaid diagrams
masterLarge or complex diagrams can be explored using zooming, panning, and resizing controls. Navigation controls typically appear when you hover over or focus on a diagram.
Zooming
- Controls: Use the
+and-buttons in the navigation overlay. - Mouse/Trackpad: Hold <kbd>alt</kbd> (<kbd>option</kbd> on Mac) and use the scroll wheel, or use a trackpad pinch gesture.
- Keyboard/Click:
Alt+clickto zoom in,Alt+Shift+clickto zoom out. - Reset: Click the
resetbutton to restore the original zoom level and position.
Panning
- Mouse: Hold <kbd>alt</kbd> (<kbd>option</kbd> on Mac) and click-and-drag to pan.
- Pan Mode: Click the
pan modebutton in the navigation controls to enable click-and-drag panning without needing to hold the <kbd>alt</kbd> key.
Resizing
- Vertical Resizing: Drag the bottom edge of a diagram to adjust its height. This is useful when combined with
markdown-mermaid.maxHeight.