Tabs

Tabs segregate similar kind of content and allow users to navigate between them without switching the context.

Usage
Code
Interactions

Variants


Basic tabs

This variation consists of only a label.

Tabs with Count

This variation uses the Pill component to display the count along with the label.

Tabs with Icon

This variant consists of an icon along with the label. Icons should only be used when they add additional value to the label.

For example, with the help of icons, one can easily see the status without actually navigating to each and every tab.

Dismissible Tabs

This variant consists of a Close Icon Button along with the label. It supports the dismissal of the tabs. These tabs can be triggered through an action button. In case the tab is already open on the screen, the action to re-open the tab should be known to the user.

Dismissible tabs

Properties

PropertyValue(s)Default value
Label<label>-
Minimum width (of a tab item)64px-
Height (of a tab item)48px-
Add-on
(optional)
  • Leading pill
  • Leading icon
  • Trailing close icon button
  • -
    Spacing between tabs0px-

    Usage


    Tabs vs Navigation

    Tabs have similar kind of content and act as filters. Don’t use tabs to group content that is dissimilar.

    Tabs have similar kind of content and act as filters

    On the other hand, navigation menu items are generally used to group independent pages.

    Navigation represents independent pages

    If navigation items and tabs are used on the same page make sure to use them in such a way that while switching between multiple tabs, the user stays on the same page and sees relative data whereas while switching between multiple navigation items, the user is taken to a new page which may or may not be relative.

    Tabs and navigation on the same page

    Tabs within other components

    Tabs are usually paired with components like headers or nested in components like cards, modals, and sidesheets.

    With page header
    In a modal
    In a card

    Tab Label

    Tabs should have short and scannable labels, generally limited to a single word.

    Maximum Tabs

    Too many tabs can unnecessarily clutter the UI. Hence it is recommended not to use more than 5 tabs at once.