The Tabs component creates a tabbed interface for organizing related content into separate, switchable panels.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/devscribe-team/webeditor/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Tabs are ideal for:- Showing code examples in multiple languages
- Platform-specific instructions (iOS, Android, Web)
- Alternative approaches or methods
- Configuration options for different environments
- API request/response examples
Insertion
Insert a Tabs component using the command menu:- Type
/to open the command menu - Search for “tabs”
- Select the Tabs option
Attributes
Array of tab names displayed in the tab bar. Each name appears as a clickable tab button.
Index of the currently active tab (0-based). The active tab’s content is displayed.
Internal storage for each tab’s content. Content is preserved when switching tabs.
Node specification
Usage examples
Multi-language code examples
Platform-specific instructions
Create tabs for different platforms:- Rename first tab to “macOS”
- Click the + button to add “Windows” and “Linux” tabs
- Add platform-specific content to each
API endpoint variations
Request and response examples
Working with tabs in the editor
Add a new tab
Click the + button on the right side of the tab bar to add a new tab. The new tab:- Gets a default name like “Tab 2”, “Tab 3”, etc.
- Starts with empty content (a blank paragraph)
- Automatically becomes the active tab
Rename a tab
- Click the tab name to open the edit modal
- Enter the new name
- Click “Save” or press Enter
Switch between tabs
Click any tab name to switch to that tab. Your content in each tab is automatically saved when you switch.Delete a tab
Click the X button next to the tab name to delete it.You cannot delete the last remaining tab. Tabs must always have at least one tab.
- If deleting the active tab, the previous tab becomes active
- If deleting tab 0, tab 1 becomes the new active tab
- All remaining tabs are renumbered
TypeScript types
Content persistence
The Tabs component intelligently manages content:- Automatic saving: When you switch tabs, current content is saved
- Content restoration: Switching back to a tab restores its exact content
- Per-tab storage: Each tab maintains independent content
- New tab defaults: New tabs start with an empty paragraph
Styling details
Tab bar:- Border along the bottom
- Rounded top corners
- Hover effects on tab buttons
- Highlighted with secondary background
- Foreground text color
- More prominent appearance
- Muted text color
- Hover effect reveals secondary background
- Smooth transition animations
- Padding around content
- Card background color
- Supports all markdown elements
Best practices
- Use descriptive tab names: Make it clear what each tab contains
- Keep tab count reasonable: 2-5 tabs is ideal; more becomes hard to navigate
- Maintain consistency: Similar structure across tabs helps users understand differences
- Order logically: Put most common or recommended option first
- Use for related content: Tabs should show variations of the same concept
Common patterns
Code examples by language
Tabs:JavaScript | Python | Ruby | PHP
Each tab shows the same functionality in different languages.
Installation methods
Tabs:npm | yarn | pnpm | bun
Each tab shows installation command for different package managers.
Framework variations
Tabs:React | Vue | Angular | Svelte
Each tab shows component implementation in different frameworks.
Environment configuration
Tabs:Development | Staging | Production
Each tab shows environment-specific configuration.
Platform guides
Tabs:Web | iOS | Android
Each tab provides platform-specific instructions.
Import from code blocks
The Tabs component can automatically import multiple<pre><code> blocks:
- Two tabs named “JavaScript” and “Python”
- Content converted to code snippets
- Proper syntax highlighting
Keyboard navigation
- Tab: Move between tab buttons and content
- Enter/Space: Activate focused tab button
- Edit modal open:
- Enter: Save and close
- Escape: Cancel and close
Accessibility features
The Tabs component includes:- Semantic HTML structure
- ARIA labels for tab controls
- Keyboard navigation support
- Focus indicators on active elements
- Clear visual distinction between active and inactive tabs
- Sufficient color contrast
Tabs use the card background and border colors from your theme, automatically adapting to light and dark modes.
Content support
Each tab can contain:- Paragraphs and headings
- Lists (ordered and unordered)
- Code blocks and code snippets
- Images
- Tables
- Other components (Fields, Frames, Steps, etc.)
- Nested markdown content