Tabs¶
What it is¶
Void styles pymdownx.tabbed content with a glass-styled tab strip that
follows the theme accent. Styling supports up to 10 tabs and adds keyboard
navigation via a small script.
When to use it¶
Use tabs to group alternate views of the same thing β the same snippet in different languages, platform-specific steps, light/dark illustrations. Keep each tab self-contained; don't split a single linear explanation across tabs.
In Markdown¶
Use the === "Label" syntax inside a tab list:
=== "Python"
```python
print("hello")
```
=== "JavaScript"
```js
console.log("hello");
```
=== "Bash"
```bash
echo "hello"
```
Configuration¶
Tabs require the pymdownx.tabbed extension (enabled in the theme's
mkdocs.yml); no per-site configuration is needed beyond that.
Live preview / screenshot¶
Example β three tabs¶
Example β many tabs (8)¶
Content one.
Content two.
Content three.
Content four.
Content five.
Content six.
Content seven.
Content eight.
Under the hood¶
- Tab groups render
.void-tabswith.void-tabs__itemlabels; the active one carries the accent underline. - A small script adds roving-tabindex + arrow-key navigation after the
pymdownx.tabbedmarkup is emitted, keeping the native structure intact.
Accessibility notes¶
- Use
Tabto focus a tab label, thenArrowLeft/ArrowRightto switch tabs β the active tab is indicated with the accent underline. - Panels stay standard tabbed content: each tab's content is contained and reachable by keyboard, and the current selection is not conveyed by color alone (underline + focus position).