Skip to main content

mkdocs-nested-tabs

Shows two hierarchy levels of navigation.tabs - one parent level, with it's children displayed below it. An alternative to Material for MkDocs' native hover-triggered tab dropdown (one category's children at a time).

Status

Early scaffold, ported and generalized from a working implementation. Not yet published.

Install

pip install mkdocs-nested-tabs   # not yet published
# mkdocs.yml
theme:
  name: material
  features:
    - navigation.tabs

plugins:
  - nested-tabs

Requires navigation.tabs to be enabled — this plugin replaces that feature's tab bar on desktop widths (≥76.234375em, matching Material's own breakpoint), it doesn't work alongside a site with tabs disabled.

How it works

Reads Material's own primary sidebar nav at runtime (which already contains the full site tree — every category, not just the active one) and builds a second row inserted directly into .md-header, right after .md-tabs, so it inherits the header's own sticky positioning and background for free. A category with a third nesting level (a sub-category with its own children, rather than a flat list of pages) doesn't fit the "category + pages" shape this renders, so it falls back to a single link using the first leaf page found inside it.

Config

plugins:
  - nested-tabs:
      enabled: true   # default

A configurable breakpoint and an option to keep Material's native tabs alongside this row instead of hiding them. Both need the static JS/CSS to be templated per-build rather than shipped as fixed package assets.

Theming

Falls back to Material's own --md-default-fg-color/--md-accent-fg-color so it looks reasonable on any palette out of the box. Override via:

:root {
  --md-nested-tabs-label-color: ...;
  --md-nested-tabs-link-color: ...;
}

Development

python3 -m venv .venv && source .venv/bin/activate
pip install -e . mkdocs-material pytest
python -m pytest tests/

Manual check: cd tests/fixture_site && mkdocs serve, then open the site and confirm the nested-tabs row renders at desktop width.

Release files for mkdocs-nested-tabs 0.1.0

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-nested-tabs 0.1.0
File Size Uploaded
mkdocs_nested_tabs-0.1.0.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-nested-tabs 0.1.0
File Interpreter ABI Platform
mkdocs_nested_tabs-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.1 kB

Release files / mkdocs_nested_tabs-0.1.0.tar.gz

Download URL mkdocs_nested_tabs-0.1.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ebdfd3370ede24290b5fafdf297dec3703c2949cd4f9535f6d38fb29f184a656
BLAKE2b-256 checksum
How to use checksums
234d58420ec676542493d95da410b161e495706352829f9d75937f013be94440
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / mkdocs_nested_tabs-0.1.0-py3-none-any.whl

Download URL mkdocs_nested_tabs-0.1.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d763669b22650a9cc2c1946ee44840514afd9f27be205706ddc0f8596828289b
BLAKE2b-256 checksum
How to use checksums
c3c891f6c150987da31c0dde8507d26d1858c9fcbb1923a4b53b670c8471e38c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.0 This release

2 release files

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