Search Documentation

Search for pages and headings in the documentation

Grouping Tabs

When you have many tabs (5+), grouping them makes navigation clearer. Tabs can be organized into categories.

What Is Tab Grouping?

Tab Group 1: User Paths
β”œβ”€ Getting Started
β”œβ”€ How-To Guides
└─ FAQ

Tab Group 2: Reference
β”œβ”€ API Documentation
β”œβ”€ CLI Reference
└─ Configuration

Tab Group 3: Advanced
β”œβ”€ Architecture
β”œβ”€ Performance
└─ Troubleshooting

Related tabs cluster together, reducing cognitive load.

Without Tab Grouping (Flat)

[Getting Started] [Guides] [API] [CLI] [Config] [Architecture] [Performance] [FAQ]
 └─ User-focused  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       └─ Reference-focused          └─ Advanced

Too many tabs. Users must scan to find what they need.

With Tab Grouping (Organized)

User Paths:    [Getting Started] [Guides] [FAQ]
Reference:     [API] [CLI] [Config]
Advanced:      [Architecture] [Performance]

Tabs grouped by purpose. Clear organization.

Configuration Structure

export const SIDEBAR_NAVIGATION = {
    docs: {
        defaultTab: {
            label: "Getting Started",
            icon: "πŸš€",
        },
        tabGroups: [
            // <- Group tabs
            {
                id: "user-paths",
                label: "User Paths",
                tabs: [
                    {
                        id: "getting-started",
                        label: "Getting Started",
                        icon: "πŸš€",
                        groups: [
                            { id: "setup", label: "Setup", autoGenerated: true },
                            { id: "first-project", label: "First Project", autoGenerated: true },
                        ],
                    },
                    {
                        id: "guides",
                        label: "How-To Guides",
                        icon: "πŸ“–",
                        autoGenerated: true,
                    },
                    {
                        id: "faq",
                        label: "FAQ",
                        icon: "❓",
                        entries: [{ slug: "faq/common-issues" }, { slug: "faq/troubleshooting" }],
                    },
                ],
            },
            {
                id: "reference",
                label: "Reference",
                tabs: [
                    {
                        id: "api",
                        label: "API",
                        icon: "πŸ”—",
                        groups: [
                            { id: "authentication", label: "Auth", autoGenerated: true },
                            { id: "endpoints", label: "Endpoints", autoGenerated: true },
                        ],
                    },
                    {
                        id: "cli",
                        label: "CLI",
                        icon: "⌨️",
                        autoGenerated: true,
                    },
                    {
                        id: "config",
                        label: "Configuration",
                        icon: "βš™οΈ",
                        entries: [
                            { slug: "reference/env-vars" },
                            { slug: "reference/config-file" },
                        ],
                    },
                ],
            },
            {
                id: "advanced",
                label: "Advanced",
                tabs: [
                    {
                        id: "architecture",
                        label: "Architecture",
                        icon: "πŸ—οΈ",
                        autoGenerated: true,
                    },
                    {
                        id: "performance",
                        label: "Performance",
                        icon: "⚑",
                        autoGenerated: true,
                    },
                ],
            },
        ],
    },
};

Structure:

tabGroups
β”œβ”€ "user-paths" (group)
β”‚  β”œβ”€ "getting-started" (tab)
β”‚  β”œβ”€ "guides" (tab)
β”‚  └─ "faq" (tab)
β”œβ”€ "reference" (group)
β”‚  β”œβ”€ "api" (tab)
β”‚  β”œβ”€ "cli" (tab)
β”‚  └─ "config" (tab)
└─ "advanced" (group)
   β”œβ”€ "architecture" (tab)
   └─ "performance" (tab)

User Experience

Visual Representation

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ User Paths:                                 β”‚
β”‚ [πŸš€ Getting Started] [πŸ“– Guides] [❓ FAQ]   β”‚
β”‚                                             β”‚
β”‚ Reference:                                  β”‚
β”‚ [πŸ”— API] [⌨️ CLI] [βš™οΈ Config]              β”‚
β”‚                                             β”‚
β”‚ Advanced:                                   β”‚
β”‚ [πŸ—οΈ Architecture] [⚑ Performance]          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tab Navigation

User on β€œGetting Started” tab views:

Sidebar showing:
β”œβ”€ Setup
β”œβ”€ First Project

User clicks β€œAPI” tab (different group):

Sidebar switches to:
β”œβ”€ Authentication
β”œβ”€ Endpoints

User clicks β€œGuides” tab (same group as Getting Started):

Sidebar shows:
β”œβ”€ [Auto-discovered guide files]

Switching tabs (any group) updates entire sidebar.

Group Label Options

Invisible Dividers (No Label)

tabGroups: [
    {
        id: "group1",
        label: "",  // <- No label shown
        tabs: [...]
    },
    {
        id: "group2",
        label: "",  // <- Visual space, no text
        tabs: [...]
    },
]

Tabs have visual separation but no labels.

Section Headers

tabGroups: [
    {
        id: "getting-started-group",
        label: "Getting Started",  // <- Shown as header
        tabs: [
            { id: "quickstart", label: "Quick Start", ... },
            { id: "tutorials", label: "Tutorials", ... },
        ],
    },
    {
        id: "reference-group",
        label: "Reference",  // <- Shown as header
        tabs: [
            { id: "api", label: "API", ... },
            { id: "config", label: "Config", ... },
        ],
    },
]

Group labels appear as section headers above tabs.

Common Tab Grouping Patterns

Pattern 1: By User Expertise

Getting Started (Beginners)
β”œβ”€ Quick Start
β”œβ”€ Tutorials
└─ FAQ

Reference (All Users)
β”œβ”€ API
β”œβ”€ CLI
└─ Configuration

Advanced (Experts)
β”œβ”€ Architecture
β”œβ”€ Performance Tuning
└─ Internals

Users find docs matching their skill level.

Pattern 2: By Function

Learning
β”œβ”€ Getting Started
β”œβ”€ Guides
└─ Examples

Building
β”œβ”€ API Reference
β”œβ”€ CLI
└─ Libraries

Operating
β”œβ”€ Deployment
β”œβ”€ Monitoring
└─ Troubleshooting

Users quickly jump to docs for their task.

Pattern 3: By Audience

Product Users
β”œβ”€ Features
β”œβ”€ How-To
└─ Support

Developers
β”œβ”€ API
β”œβ”€ SDK
└─ Webhooks

DevOps
β”œβ”€ Installation
β”œβ”€ Configuration
└─ Scaling

Each audience sees relevant tabs together.

Pattern 4: By Version

Current Release
β”œβ”€ v3.0 (Latest)
└─ v3.1 (Stable)

Legacy
β”œβ”€ v2.0 (LTS)
└─ v1.0 (Deprecated)

Experimental
└─ v4.0 (Beta)

Version users need grouped clearly.

Pattern 5: SaaS Platform

Platform
β”œβ”€ Getting Started
β”œβ”€ Features
└─ FAQ

Documentation
β”œβ”€ API
β”œβ”€ CLI
└─ SDKs

Resources
β”œβ”€ Examples
β”œβ”€ Pricing
└─ Blog

Platform docs, developer docs, and resources separated.

Collapsible Groups

Some implementations allow collapsing groups:

β–Ό Getting Started       (expanded)
  [Quick Start] [Guides] [FAQ]

β–Ά Reference            (collapsed)

β–Ό Advanced             (expanded)
  [Architecture] [Performance]

Users collapse groups they don’t need, focus on relevant tabs.

Migration: Flat to Grouped Tabs

Before (No Groups)

groups: [
    { id: "getting-started", label: "Getting Started", tab: true, ... },
    { id: "guides", label: "Guides", tab: true, ... },
    { id: "api", label: "API", tab: true, ... },
    { id: "cli", label: "CLI", tab: true, ... },
    { id: "architecture", label: "Architecture", tab: true, ... },
]

5 tabs in flat list.

After (Grouped)

tabGroups: [
    {
        id: "learning",
        label: "Learning",
        tabs: [
            { id: "getting-started", label: "Getting Started", ... },
            { id: "guides", label: "Guides", ... },
        ],
    },
    {
        id: "reference",
        label: "Reference",
        tabs: [
            { id: "api", label: "API", ... },
            { id: "cli", label: "CLI", ... },
        ],
    },
    {
        id: "advanced",
        label: "Advanced",
        tabs: [
            { id: "architecture", label: "Architecture", ... },
        ],
    },
]

Same tabs, better organized.

Performance Considerations

Tab grouping is purely organizational:

  • No performance impact
  • All tabs still lazy-load on click
  • Grouping is visual only

Whether flat or grouped, same number of tabs = same performance.

When to Use Tab Grouping

Use when:

  • 5+ tabs total
  • Tabs serve different purposes
  • Clear grouping emerges
  • Want to improve navigation

Skip grouping when:

  • < 5 tabs
  • Tabs already clearly organized
  • All tabs serve similar purpose

Responsive Behavior

On mobile, grouped tabs might collapse:

Desktop: [Getting Started] [Guides] [API] [CLI] [Architecture]
         └─ Getting Started Group  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Mobile: Getting Started β–Ό
(Dropdown expands to show all groups and tabs)

Grouping helps on small screens too.

Next Steps