-
Notifications
You must be signed in to change notification settings - Fork 5
Blocks Tabs
Version: 1.0.0 Category: Design Keywords: tabs, tabbed, accordion, toggle
The Tabs block creates accessible tabbed content interfaces that organize information into clickable panels. Unlike accordions which stack vertically, tabs display navigation horizontally (or vertically) with content panels that switch when users click different tabs. Perfect for organizing related content, product information, pricing tiers, and feature comparisons.
Key Features:
- Horizontal and vertical tab orientations
- 4 visual tab styles (Default, Pills, Underline, Minimal)
- Optional icons on tab labels (with 3 position options)
- Responsive mobile modes (Accordion, Dropdown, or Scrollable Tabs)
- Deep linking support (URL hash navigation)
- Comprehensive color customization
- Keyboard navigation (arrow keys, Home/End)
- Fully accessible (WCAG 2.1 AA compliant)
- Mobile-optimized with configurable breakpoint
- Quick Start
- Tab Orientations
- Tab Styles
- Settings & Configuration
- Mobile Responsiveness
- Deep Linking
- Common Use Cases
- Styling Options
- Best Practices
- Accessibility
- FAQ
-
Add the Tabs Block
- In the block editor, click the
+button - Search for "Tabs" or find it in the "Design" category
- The block starts with 3 tabs by default
- In the block editor, click the
-
Edit Tab Titles
- Click on a tab in the navigation to select it
- In the sidebar, edit the "Tab Title" field
- The title updates in the tab navigation
-
Add Content to Tabs
- Click a tab in the navigation to view its content panel
- Click inside the content area to add blocks
- Add any WordPress blocks (paragraphs, images, buttons, etc.)
-
Customize Appearance (optional)
- Change tab style (Default, Pills, Underline, Minimal)
- Adjust colors in the Color panel
- Configure mobile behavior for smaller screens
Choose how tabs are arranged on the page:
Layout:
- Tab navigation appears across the top
- Content panels appear below
- Tabs flow left-to-right
Alignment Options:
- Left: Tabs aligned to left edge
- Center: Tabs centered
- Right: Tabs aligned to right edge
- Justified: Tabs stretch to fill full width
Best For:
- Most common use case
- Desktop-first designs
- 3-6 tabs (more can wrap on mobile)
- Standard website layouts
Layout:
- Tab navigation appears on the left side
- Content panels appear to the right
- Tabs stack top-to-bottom
Best For:
- Sidebar-style navigation
- Many tabs (8+ tabs)
- Longer tab titles
- Documentation and help centers
- Wide content areas
Note: Vertical tabs automatically adjust on mobile based on Mobile Mode setting.
Choose from 4 visual styles for tab navigation:
Appearance:
- Bordered tabs with background colors
- Clear separation between tabs
- Active tab stands out with different background
Best For:
- Professional, business sites
- E-commerce product pages
- Dashboard interfaces
- Traditional web applications
Visual Characteristics:
- Border around each tab
- Background color fills
- Distinct active state
Appearance:
- Rounded, button-like tabs
- Compact, modern design
- Active tab has filled background
Best For:
- Modern, minimalist designs
- Mobile-first interfaces
- Small tab counts (3-5 tabs)
- Call-to-action focused designs
Visual Characteristics:
- Rounded corners (pill-shaped)
- Hover effects
- Clear active state with background fill
Appearance:
- Minimal tabs with bottom border
- Clean, text-focused design
- Active tab has underline indicator
Best For:
- Minimal, content-focused sites
- Blog layouts
- News and media sites
- Clean, modern aesthetics
Visual Characteristics:
- No background colors by default
- Bottom border on active tab
- Lightweight, unobtrusive
Appearance:
- Text-only tabs
- No borders or backgrounds
- Active state shown with color only
Best For:
- Ultra-minimal designs
- Text-heavy interfaces
- Documentation sites
- When content should take center stage
Visual Characteristics:
- No visual decoration
- Relies on color for active state
- Most lightweight option
Orientation
- Horizontal: Tabs across top (default)
- Vertical: Tabs along left side
Tab Style
- Default, Pills, Underline, or Minimal
- See Tab Styles section for details
Alignment (Horizontal only)
- Left, Center, Right, or Justified
- Controls how tabs are positioned in navigation bar
Gap Between Tabs
- Range: 0-40px
- Default: 8px
- Controls spacing between individual tabs
- Smaller gaps: More compact
- Larger gaps: More breathing room
Show Border Below Tabs
- Toggle on/off
- Adds horizontal divider line between navigation and content
- Useful for visual separation
- Works with all tab styles
Configure how tabs behave on smaller screens:
Mobile Breakpoint (px)
- Range: 320-1024px
- Default: 768px
- Screen width below which mobile mode activates
- Common values:
- 480px: Small phones only
- 768px: Tablets and phones (standard)
- 1024px: Tablets in portrait mode
Mobile Mode Choose how tabs transform on mobile:
-
Accordion (Default)
- Tabs convert to vertical accordion
- Each tab becomes a collapsible section
- Space-efficient for small screens
- Best for: Most use cases
-
Dropdown
- Tabs become a select dropdown menu
- User selects tab from dropdown
- Very compact
- Best for: Many tabs, limited space
-
Tabs (Scrollable)
- Tabs remain as tabs but scroll horizontally
- Swipe to see more tabs
- Maintains desktop appearance
- Best for: Visual consistency, fewer tabs
Enable Deep Linking
- Toggle on/off
- Allows tabs to be accessed via URL hash
- Example:
yoursite.com/page#tab-features - Benefits:
- Shareable tab links
- Browser back button support
- Direct navigation to specific tab
- Improved SEO
How Deep Linking Works:
- Enable "Deep Linking" in Advanced panel
- Each tab gets an anchor based on its title
- Share URLs with hash:
#tab-title - When page loads with hash, corresponding tab opens
- Browser back/forward buttons work with tabs
Use Cases:
- Product comparison pages (link to "Pricing" tab)
- Documentation (link to specific sections)
- Marketing pages (link to "Features" tab from email)
- Multi-step forms (bookmark progress)
Comprehensive color controls in the "Color" panel:
Tab Text
- Text color for inactive tabs
- Default: Inherits from theme
Tab Background
- Background color for inactive tabs
- Applies to Default and Pills styles
- Minimal/Underline styles ignore this
Active Tab Text
- Text color for the selected tab
- Should contrast with Active Tab Background
- Provides clear visual feedback
Active Tab Background
- Background color for the selected tab
- Most important color for visual hierarchy
- Should stand out from inactive tabs
Tab Border
- Color for tab borders
- Applies to Default style primarily
- Subtle colors work best
Tab Content Background
- Background color for content panel area
- Independent from tab navigation colors
- Useful for visual distinction
Color Best Practices:
- Ensure Active Tab visually dominates
- Maintain 4.5:1 contrast ratio for text
- Test in both light and dark modes
- Keep inactive tabs subtle
- Use theme colors for consistency
Default Breakpoint: 768px
- Tablets in portrait mode and smaller screens
Consider Changing If:
- Your tabs are narrow: Use 480px (phones only)
- Your tabs are wide: Use 1024px (include tablets)
- You have many tabs: Lower breakpoint for earlier conversion
| Mode | Pros | Cons | Best For |
|---|---|---|---|
| Accordion | Space-efficient, familiar pattern | Multiple clicks to compare | Most use cases, FAQs |
| Dropdown | Very compact, works with many tabs | Less discoverable | Many tabs, advanced users |
| Tabs (Scrollable) | Maintains desktop look, swipeable | Can feel cramped | Few tabs, visual consistency |
- Test at your chosen breakpoint
- Verify tap targets are large enough (min 44px)
- Check text readability on small screens
- Test swipe gestures (if using scrollable tabs)
- Verify dropdown works (if using dropdown mode)
- Test in both portrait and landscape
- Ensure content doesn't overflow horizontally
-
Enable in Tabs Block
- Select Tabs block
- Go to "Advanced" panel
- Toggle "Enable Deep Linking" on
-
Automatic Anchor Generation
- Each Tab automatically gets an anchor from its title
- "Features" tab →
#features - "Pricing Plans" tab →
#pricing-plans
-
Custom Anchors (optional)
- Select individual Tab block
- Set custom "Anchor (URL Hash)" in Tab Settings
- Use URL-friendly names (lowercase, hyphens, no spaces)
Share Links:
https://yoursite.com/products#features
https://yoursite.com/pricing#enterprise-plan
https://yoursite.com/docs#installation
In Navigation Menus:
- Add custom links pointing to tab anchors
- Users click menu item, page scrolls and tab opens
In Content:
- Link from other pages or sections
- Example: "Learn more in our Features tab" (link to
#features)
In Email Campaigns:
- Direct users to specific tab content
- Improves conversion by reducing clicks
URL Parameters + Tabs:
- Combine with query parameters:
?product=pro#pricing - Great for analytics tracking
DO:
- Use clear, descriptive anchors (
#pricingnot#tab3) - Test links before sharing
- Keep anchors short and memorable
- Use consistent naming across your site
DON'T:
- Use special characters in anchors
- Change anchors after sharing (breaks links)
- Use duplicate anchors on the same page
- Rely solely on deep links (provide navigation too)
Goal: Organize product details into scannable sections
Setup:
- Horizontal orientation
- Pills or Default tab style
- 3-5 tabs: "Overview", "Features", "Specifications", "Reviews"
- Enable deep linking for sharing specific sections
Tab Content Ideas:
- Overview: Hero image, key benefits, CTA button
- Features: List with icons, feature highlights
- Specifications: Table or list of technical specs
- Reviews: Testimonials, ratings, customer quotes
Tips:
- Keep "Overview" tab first (default visible)
- Use icons on tabs for visual interest
- Add "Buy Now" buttons in relevant tabs
- Link to "Specifications" tab from product features
Goal: Compare pricing plans side-by-side
Setup:
- Horizontal orientation, justified alignment
- Pills style for button-like appearance
- 3 tabs: "Starter", "Professional", "Enterprise"
- Accordion mode on mobile for easy comparison
Tab Content:
- Columns block with features list
- Pricing table
- "Choose Plan" button
- Feature comparison checklist
Tips:
- Highlight recommended plan visually
- Use active tab colors to emphasize selection
- Include annual vs monthly toggle inside content
- Add FAQ accordion below tabs
Goal: Organize help content into logical sections
Setup:
- Vertical orientation (many sections)
- Underline or Minimal style (clean, content-focused)
- Tabs: "Getting Started", "Configuration", "API Reference", "Troubleshooting"
- Enable deep linking for bookmarking
Tab Content:
- Headings for subsections
- Code blocks for technical content
- Images/screenshots for visual guidance
- "Next Steps" links at bottom
Tips:
- Use clear, action-oriented tab titles
- Keep navigation visible (vertical orientation)
- Add table of contents in first tab
- Cross-link between tabs when relevant
Goal: Display event details in organized sections
Setup:
- Horizontal orientation, center aligned
- Default or Pills style
- Tabs: "Schedule", "Speakers", "Venue", "Register"
- Tabs mode on mobile (maintain visual consistency)
Tab Content:
- Schedule: Timeline, session list, breaks
- Speakers: Speaker bios with photos
- Venue: Map, directions, parking info
- Register: Registration form, pricing
Tips:
- Use icons (calendar, person, location, ticket)
- Keep most important tab first ("Register" or "Schedule")
- Add countdown timer in Register tab
- Include social sharing buttons
Goal: Showcase team members or departments
Setup:
- Horizontal orientation
- Pills or Default style
- Tabs by department: "Leadership", "Engineering", "Design", "Sales"
- Accordion on mobile for vertical scrolling
Tab Content:
- Team member cards (image, name, role)
- Department description
- Contact information
- Department achievements
Tips:
- Use consistent layout for each department
- Include photos for visual interest
- Add "Join Our Team" CTA in relevant sections
- Link to individual bio pages if available
Spacing
- Margin: Space around entire tabs block
- Padding: Space inside tabs container
- Block Gap: Control spacing between elements
Colors
- Use the dedicated Tab Colors panel (see Color Settings)
- Overall background and text colors available in standard Color panel
Typography
- Font Size: Affects tab labels and content
- Line Height: Spacing between text lines
- Font Family: Custom fonts for tabs
- Font Weight: Bold, normal, light
Border
- Border Radius: Round corners of entire tabs block
- Border Color/Width: Outer border around tabs
- Border Style: Solid, dashed, dotted
Alignment
- Wide width: Extends to wider content area
- Full width: Extends to full page width
Each Tab block (panel) can be styled independently:
- Padding inside content area
- Background color and image
- Text and link colors
- Typography settings
- Alignment (wide, full)
See Tab Block Documentation for details.
DO:
- Keep tab count reasonable (3-7 tabs ideal)
- Use clear, concise tab labels (1-2 words)
- Put most important content in first tab
- Provide visual feedback for active tab
- Test on mobile devices
- Use icons sparingly (don't clutter)
DON'T:
- Hide critical content in later tabs
- Use overly technical labels
- Create too many tabs (consider navigation menu instead)
- Rely on color alone to indicate active state
- Forget to test keyboard navigation
- Use tabs for sequential content (use steps/wizard instead)
When to Use Tabs:
- Related content that can be viewed independently
- Comparison scenarios (pricing, features)
- Space-constrained layouts
- Dashboard-style interfaces
- Product information organization
When NOT to Use Tabs:
- Sequential processes (use steps/wizard)
- Content that should be visible simultaneously
- Very short content (unnecessary hiding)
- Critical information users must see (keep visible)
- SEO-critical content (tabs may impact indexing)
Optimization Tips:
- Tabs are lightweight with minimal JavaScript
- All tab content loads immediately (not lazy-loaded)
- Consider image optimization in tab content
- Avoid embedding multiple videos in tabs (bandwidth)
- Test page load time with content-heavy tabs
SEO Considerations:
- Search engines can index tab content
- All content is in page HTML (not AJAX loaded)
- Deep linking improves discoverability
- Use semantic headings inside tabs
- Don't hide critical keywords in tabs
The Tabs block is built to WCAG 2.1 AA standards:
Tab Key:
- Moves focus to tab navigation
- Cycles through tabs
Arrow Keys:
- Left/Right (horizontal): Navigate between tabs
- Up/Down (vertical): Navigate between tabs
- Automatically activates focused tab
Home/End Keys:
- Home: Jump to first tab
- End: Jump to last tab
Enter/Space:
- Activate focused tab (when not auto-activating)
ARIA Attributes:
-
role="tablist"on navigation -
role="tab"on each tab button -
role="tabpanel"on each content panel -
aria-selectedindicates active tab -
aria-controlslinks tab to panel -
aria-labelledbylinks panel to tab
Announcements:
- Screen readers announce tab count ("Tab 2 of 5")
- Active state announced
- Panel content is accessible
- Navigation structure is clear
Contrast Requirements:
- Text on tab buttons: 4.5:1 ratio minimum
- Active tab must be visually distinct
- Focus indicators clearly visible
- Hover states sufficient contrast
Motion:
- Respects
prefers-reduced-motion - No autoplay/auto-rotation
- User controls all interactions
DO:
- Test with keyboard only
- Verify screen reader announcements
- Ensure sufficient color contrast
- Provide clear focus indicators
- Use descriptive tab labels
DON'T:
- Rely on color alone for active state
- Use low contrast colors
- Hide focus indicators
- Use tiny text (minimum 16px recommended)
- Forget to test with assistive technology
Q: How many tabs can I add? A: No technical limit, but 3-7 tabs is ideal for UX. More than 10 tabs should use vertical orientation or consider an alternative UI pattern.
Q: Can I use icons on tabs? A: Yes! Each Tab block has an Icon Picker. Choose from a library of icons and position them left, right, or top of the tab title.
Q: Do tabs work with page caching? A: Yes! Tabs work with all caching plugins. They use client-side JavaScript that runs after page load.
Q: Can I link to a specific tab from another page?
A: Yes! Enable "Deep Linking" in the Tabs block settings. Then link to yoursite.com/page#tab-anchor.
Q: How do I change which tab is active by default? A: In the editor, simply click the tab you want to be active. The editor remembers and saves the active tab state.
Q: Can I use tabs inside tabs (nested tabs)? A: Technically yes, but not recommended. Nested tabs create poor UX and confuse users.
Q: Why do my tabs wrap to multiple rows on desktop? A: Too many tabs or long tab titles. Solutions:
- Reduce tab count
- Shorten tab titles
- Use vertical orientation
- Increase breakpoint for earlier mobile conversion
Q: Can I style individual tabs differently? A: Tab navigation uses consistent styling (from parent Tabs block). However, each Tab's content panel can have unique colors, padding, and backgrounds.
Q: Do tabs affect SEO? A: Tab content is in the HTML and indexable by search engines. However, Google may prioritize visible content. Use deep linking and ensure critical content is in first tab.
Q: How do I remove a tab? A: Select the Tab block (click in its content area), then click the three dots in the toolbar and select "Remove Tab". You must have at least 1 tab.
Q: Can I reorder tabs? A: Yes! Use the up/down arrows in the block toolbar, or drag and drop in the List View.
Q: Why don't my tab colors show? A: Check that you're setting colors in the right place:
- Tab navigation colors: Set on parent Tabs block
- Content panel colors: Set on individual Tab blocks
Related Blocks:
- Tab Block - Individual tab panel documentation
- Accordion Block - Alternative collapsible content
General Documentation:
Need Help?
- GitHub Issues - Report bugs
- GitHub Discussions - Ask questions
Last Updated: 2025-11-19 DesignSetGo v1.0.0 WordPress 6.4+
Auto-generated from
docs/blocks/TABS.md. To update, edit the source file and changes will sync on next push to main.
- Accordion
- Blobs
- Breadcrumbs
- Card
- Comparison Table
- Countdown Timer
- Counter Group
- Divider
- Flip Card
- Form Builder
- Grid
- Icon
- Icon Button
- Icon List
- Image Accordion
- Map
- Modal
- Modal Api Reference
- Modal Auto Triggers
- Modal Fse Compatibility
- Modal Gallery Navigation
- Modal Next Phase
- Modal Performance Fixes
- Modal Security Audit
- Modal Security Fixes Summary
- Modal Trigger
- Pill
- Progress Bar
- Reveal
- Row
- Scroll Accordion
- Scroll Gallery
- Section
- Slider
- Table Of Contents
- Tabs
- Timeline
- Animation
- Background Video
- Block Animations
- Clickable Group
- Custom Css
- Expanding Background
- Grid Mobile Order
- Grid Span
- Max Width
- Responsive Visibility
- Reveal Control
- Scroll Parallax
- Sticky Header
- Text Alignment Inheritance
- Text Reveal
- Ai Assisted Development
- Best Practices Summary
- Block Controls Organization
- Block Development Best Practices Comprehensive
- Block Exclusion Guide
- Control Reorganization
- Design System
- Wordpress Block Editor Best Practices
- Color Controls Pattern
- Custom Css Filters
- Performance Css Strategy
- Width Css Strategy Implementation
- Width Layout Patterns
- Antigravity Audit
- Card Block Audit
- Claude Audit
- Comprehensive Audit
- Cursor Audit
- Scroll Accordion Stacking Notes
- Security Review 1.2.1
- 2026 02 11 Icon Search Aliases Design
- 2026 02 14 Overlay Header Design
- 2026 02 15 Deactivation Block Migrator Design