skillfed

mkdocs-panzoom-plugin

MkDocs Plugin to enable pan & zoom on images and mermaid diagrams

mkdocs-panzoom-plugin v0.5.2 1.2M downloads/30d#4,291 on PyPI70
Permissive license MIT AGING released

What it is and what it does

This MkDocs plugin wraps the panzoom JavaScript library to enable interactive zooming and panning on diagrams and images within your documentation. By default it activates on Mermaid and D2 diagrams, but you can configure it to work on any HTML element via CSS selectors, including standard img tags. Users interact with it by holding a modifier key (Alt by default) and using mouse wheel or drag gestures to zoom and pan.

The plugin automatically persists zoom state and pan position per diagram in browser localStorage, remembering user preferences across page reloads. It supports customization of the activation key, hint display location, initial zoom level, and full-screen mode. The implementation moved to a Markdown extension in version 0.4.0, which improved performance but introduced a requirement for explicit pymdownx.superfences configuration when using Mermaid diagrams.

Use it for:

  • Enable users to zoom into large architecture diagrams or flowcharts embedded in technical documentation.
  • Allow interactive exploration of complex Mermaid diagrams without leaving the documentation page.
  • Provide pan-and-zoom capability for high-resolution images or screenshots in API or design documentation.
  • Improve readability of dense D2 diagrams by letting readers focus on specific areas.
  • Enhance documentation for data visualization or scientific content where detail inspection is valuable.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds interactive pan and zoom functionality to images and diagrams (Mermaid, D2) in MkDocs documentation sites via a plugin.

Yes, if you use MkDocs with Mermaid or D2 diagrams and want to give readers interactive zoom/pan without extra tooling. Install friction is low and the MIT license poses no restrictions. The aging maintenance status (235 days since last release) is a minor concern but the repository remains active and there are no known vulnerabilities. Verify that the pymdownx.superfences configuration requirement fits your setup before committing.

Install

mkdocs-panzoom-plugin on PyPI

pip

pip install mkdocs-panzoom-plugin

uv

uv add mkdocs-panzoom-plugin

poetry

poetry add mkdocs-panzoom-plugin

Installing mkdocs-panzoom-plugin

Before you install

Low friction install as a pure Python wheel with a single runtime dependency on mkdocs. Maintenance status is aging—last release was 235 days ago—but the repository remains active and unarchived with recent commits.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial documentation projects.

Quickstart

pip install mkdocs-panzoom-plugin

Add to mkdocs.yml:
plugins:
  - search
  - panzoom

Define site_url in mkdocs.yml for the plugin to work.

Requires site_url to be defined in mkdocs.yml configuration; as of version 0.4.0, pymdownx.superfences custom_fences configuration for Mermaid is needed for full functionality.

Verify before relying

  • Whether the 30-day automatic cleanup of localStorage zoom states is configurable or always enforced.
  • Compatibility with MkDocs versions beyond those tested during development.
  • Performance impact when applied to pages with many diagrams or large images.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 1 — mkdocs
Maintenance aging — 235 days since the last release
Last repo commit
First released
Downloads 1,153,941/month — #4,291 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mkdocs_panzoom_plugin-0.5.2-py3-none-any.whl

Keywords: mkdocs, zoom, pan, plugin, mermaid, images

Intended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

mkdocs image zoom panmermaid diagram zoom plugininteractive documentation diagramsmkdocs image viewerpan zoom mermaid mkdocsdocumentation diagram interactionmkdocs plugin zoom
mkdocs-plugindiagram-interactiondocumentation-enhancement

More Documentation packages

docutils

Docutils converts plaintext documentation in…

unclear · top 1,000 on PyPI

Sphinx

Sphinx generates professional documentation…

permissive · top 1,000 on PyPI

griffe

Griffe extracts the complete structure and…

permissive · top 1,000 on PyPI

sphinxcontrib-serializinghtml

A Sphinx extension that outputs documentation…

permissive · top 1,000 on PyPI

alabaster

Alabaster is a clean, responsive Sphinx theme…

permissive · top 1,000 on PyPI

sphinxcontrib-htmlhelp

A Sphinx extension that generates HTML help…

permissive · top 1,000 on PyPI

mkdocs-mermaid2-plugin

A MkDocs plugin that renders Mermaid diagram…

permissive · top 5,000 on PyPI

mkdocs-glightbox

A MkDocs plugin that automatically wraps images…

permissive · top 5,000 on PyPI

mkdocs-drawio

A MkDocs plugin that embeds interactive Drawio…

permissive · top 15,000 on PyPI

mkdocs-kroki-plugin

A MkDocs plugin that converts Kroki diagram…

permissive · top 15,000 on PyPI

sphinxcontrib-mermaid

Embeds Mermaid diagrams (flowcharts, sequence…

permissive · top 5,000 on PyPI

mermaid-py

mermaid-py provides a Python interface to the…

permissive · top 15,000 on PyPI

mkdocs-video

A MkDocs plugin that embeds videos in…

permissive · top 15,000 on PyPI

mkdocs-include-markdown-plugin

A MkDocs plugin that includes content from…

permissive · top 15,000 on PyPI

mkdocs-awesome-pages-plugin

A plugin for MkDocs that lets you customize…

permissive · top 5,000 on PyPI

mkdocs-llmstxt

MkDocs plugin that generates an /llms.txt file…

permissive · top 15,000 on PyPI