Skip to main content
BEEQ Tab component overview

Tab component overview

Tabs let users navigate between related sections of content within the same page or view. Each tab reveals one panel at a time, keeping the interface clean while making multiple content sections available without navigation.
bq-tab must always be placed inside a bq-tab-group. The group manages tab state, keyboard navigation, and propagates size, orientation, and placement to all child tabs automatically.

When to use

Use tabs when
  • Content can be clearly organized into a small number of distinct, peer-level sections
  • Users need to compare or switch between sections without losing page context
  • Space is limited and displaying all sections at once would clutter the layout
  • Each section can stand independently without requiring the user to read others first

Do not use tabs when
  • The number of tabs exceeds seven — prefer a sidebar navigation or dropdown instead
  • Content across sections is sequential and users must read them in order — prefer a stepper
  • Sections contain very different content types that do not relate to the same subject
  • The goal is to navigate to a new page or route — prefer anchor links or a navigation component

Anatomy

BEEQ Tab component anatomy

Tab component anatomy

The tab group renders a list of tab buttons inside a scrollable container. Each individual tab consists of an optional icon, a text label, and an active-state underline indicator.

Design guidelines

Orientation

Size

1

small

Compact tabs with reduced padding. Use in dense interfaces or data-heavy views where space is constrained.
2

medium

The default size. Appropriate for most applications and standard-density layouts.
3

large

Prominent tabs with increased padding. Use when tabs are a primary navigation element or accessibility requires larger touch targets.
Setting size on bq-tab-group propagates the value to all child bq-tab elements automatically. You do not need to set size on each tab individually.

Placement

Use placement="start" (default) to left-align horizontal tabs or top-align vertical tabs. Use placement="end" to right-align horizontal tabs or bottom-align vertical tabs.

Usage

Default

Options

With icons

Tabs support an optional icon displayed before the label via the icon slot.

Sizes

Vertical

Set orientation="vertical" on bq-tab-group to stack tabs in a column beside the content area.

No divider

Use disable-divider to hide the underline separator between the tab list and the content area.

Best practices

DoKeep tab labels short and parallel — prefer noun phrases like “Overview”, “Details”, or “Settings” rather than full sentences.

Don’tDon’t use tabs with only one or two items — a single visible section or a toggle is simpler and less visually heavy.

DoAlways provide a controls attribute on each bq-tab pointing to the id of its associated panel element to meet ARIA requirements.

Don’tDon’t mix tabs of different sizes in the same tab group. Set size on bq-tab-group and let it propagate uniformly.

DoUse consistent tab labels across your interface — if some tabs have icons, apply icons to all tabs in the same group.

Don’tDon’t use tabs for actions or commands. Tabs are for navigation between content views, not for triggering operations like “Save” or “Delete”.

DoChoose the orientation that matches your layout — use horizontal tabs for top-of-content placement and vertical tabs for sidebar-style navigation.

Don’tDon’t rely solely on the active-indicator underline for visual differentiation — ensure sufficient color contrast on the active tab label as well.

Accessibility

bq-tab-group and bq-tab implement the ARIA Tabs pattern:
  • The tab list container has role="tablist".
  • Each bq-tab renders as a <button role="tab"> with aria-selected and aria-disabled set automatically.
  • The controls prop maps to aria-controls, linking each tab to its panel. Always provide a matching id on the panel element and role="tabpanel" for correct screen reader announcements.
  • Keyboard navigation is handled by the tab group:
    • ArrowRight / ArrowDown — move focus to the next enabled tab
    • ArrowLeft / ArrowUp — move focus to the previous enabled tab
  • Focus management follows the roving tabindex pattern: only the active tab is in the tab order; other tabs are reachable via arrow keys.
  • Disabled tabs have aria-disabled="true" and disabled set on the underlying button, removing them from interaction.
Your responsibilities:
  • Provide a meaningful controls value on each bq-tab that matches the id of the corresponding panel.
  • Add role="tabpanel" to each panel element.
  • When using icons without a visible label, add a descriptive aria-label to the bq-tab so screen readers can identify the tab.

API reference

bq-tab-group

Properties

Events

Slots

Shadow parts


bq-tab

Properties

Events

Methods

Slots

Shadow parts

CSS custom properties

Resources

Interactive playground

Explore Tab variants and states in Storybook

Source code

View the component source on GitHub