Skip to main content

Panzoom for MkDocs

This plugin makes use of the panzoom (LICENCE) library by Andrei Kashcha

Live Demo

Setup

pip install mkdocs-panzoom-plugin

Add it to your mkdocs.yml:

plugins:
  - search
  - panzoom

Usage

Examples and usage are available in the docs.

Config

Selectors

Mermaid and D2 are included by default, but you can add any arbitrary selector or exclude the default ones. To enable images add the img tag like below.

plugins:
  - panzoom:
      include_selectors:
        - .myClass # class in html
        - "#myId" # id in html
        - "img" # tag in html
      exclude_selectors:
        - ".mermaid"
        - ".d2"

Exclude items

To exclude a single item add the class pz-ignore. Example for an image

Hint

This makes the hint on how to use it permanently visible.

plugins:
  - panzoom:
      always_show_hint: true # default false

This changes the location of the hint

plugins:
   - panzoom:
      hint_location: "top" # default bottom

Hide hint completely

plugins:
   - panzoom:
      hint_location: "disabled" # default bottom

Use different key

Options for activation key are:

  • alt
  • ctrl
  • shift
  • none
plugins:
  - panzoom:
      key: "ctrl" # default alt

Set Initial Zoom Level

This sets the initial zoom level for all diagrams and images.

plugins:
  - panzoom:
      initial_zoom_level: 1.5 # default 1.0

Exclude Pages

Enable Fullscreen

plugins:
  - panzoom:
      full_screen: True # default False

Automatic Zoom State Persistence

The plugin automatically saves the zoom level and pan position for each diagram to your browser's localStorage. This means:

  • Persistent Settings: Your preferred zoom level and position for each diagram are remembered across page reloads
  • Per-Diagram Memory: Each diagram on a page maintains its own zoom state independently
  • Automatic Cleanup: Saved states older than 30 days are automatically cleared
  • Reset Functionality: Using the reset button clears the saved state for that diagram and returns to the configured initial zoom level

This feature works automatically - no additional configuration is required. The zoom states are stored locally in your browser and are not shared between different browsers or devices.

Star History

Star History Chart

Credits

The structure and some parts are from the enumerate-headings-plugin (LICENCE)

Metadata

Release files for mkdocs-panzoom-plugin 0.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-panzoom-plugin 0.5.3
File Size Uploaded Provenance Actions
mkdocs_panzoom_plugin-0.5.3.tar.gz 22.9 kB With provenance Details for mkdocs_panzoom_plugin-0.5.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-panzoom-plugin 0.5.3
File Interpreter ABI Platform Actions
mkdocs_panzoom_plugin-0.5.3-py3-none-any.whl Python 3 none any Details for mkdocs_panzoom_plugin-0.5.3-py3-none-any.whl

Total release size: 45.9 kB

Release files / mkdocs_panzoom_plugin-0.5.3.tar.gz

Download URL mkdocs_panzoom_plugin-0.5.3.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b87b020cf2b88ae67d790f82ce00f52b399e8e1d3e0bbe11334d2b6268e99a77
BLAKE2b-256 checksum
How to use checksums
e05c91200496bfe6e408c6523e2934dbc7895d7348b029839d09bbfce9dbf3b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / mkdocs_panzoom_plugin-0.5.3-py3-none-any.whl

Download URL mkdocs_panzoom_plugin-0.5.3-py3-none-any.whl
Size 23.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf81912a99d1405064ab274f5a648168eba6abc8e3d00d97c3622642ee32dcc7
BLAKE2b-256 checksum
How to use checksums
b8930342343d9c146ace06a1c9f4639dcffdd30d90b7e001c7907fd8230a7444
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for mkdocs-panzoom-plugin 0.5.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mkdocs_panzoom_plugin-0.5.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page