Skip to content
Tabs
Github.com

Tabs

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.

Usage

=== "Python"
    ```python
    print("hello")
    ```

=== "JavaScript"
    ```js
    console.log("hello");
    ```

=== "Bash"
    ```bash
    echo "hello"
    ```

Example β€” three tabs

def greet(name):
    print("hello " + name)
function greet(name) {
  console.log("hello " + name)
}
greet() {
  echo "hello $1"
}

Example β€” many tabs (8)

Content one.

Content two.

Content three.

Content four.

Content five.

Content six.

Content seven.

Content eight.

Keyboard usage

Use Tab to focus a tab label, then ArrowLeft / ArrowRight to switch tabs. The active tab is indicated with the accent underline.