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.