• Home
  • Getting started
  • Foundation
  • Components
    • Accordion
    • Avatar
    • Badge
    • Bet Button
    • Bet Prediction
    • Bottom Sheet
      Deprecated
    • Button
    • Callout
    • Card
    • Carousel
    • Checkbox
    • Composable Modal
    • Date Picker
    • Dialog
    • Drawer
    • Floating Action Bar
    • Input
    • Notice
    • Pagination
    • Popover
    • Price label
    • Radio group
    • Select
    • Separator
    • Slider
    • Snackbar
    • Switch
    • Table
    • Tabs
    • Tabs Menu
    • Toggle Group
    • Tooltip
  • Patterns
  • Writing (SE)
  • Guidelines
  • Brand portal

Search the design system

Components

Tabs

View as markdown (opens in a new tab)

Tabs are used to switch content within a section.

Tabs

Usage

Use Tabs to allow the user to switch content within a section. For navigation patterns consider using the Tabs menu component. For selecting options within a form setting the Toggle group could be more appropriate choice of component.

Navigation and content

The Tabs component is often used alongside a Tabs menu, at a hierarchically lower level to further organize content. In contrast the Tabs menu component is used for navigation between different pages within a page.

Navigation and content

A fictional example where Tabs menu and Tabs are used in combination for navigation and organization.

When to use the tabs component

When to use the tabs component – 1
Use tabs for switching within a section.
When to use the tabs component – 2
Don’t use the tabs component for navigation patterns where an item link navigates to a separate destination.
When to use the tabs component – 3
Don’t use the tabs component for changing configurations in a form setting.

States

Selected, default, hover and pressed states are indicated by the background and text changing colour.

States
  1. Selected
  2. Default
  3. Hover
  4. Pressed

Formatting

Anatomy

The tabs component consists of a configurable number of tabs within a container.

Anatomy
  1. Container
  2. Text label
  3. Selected label
  4. Default label
  5. Close button (optional)

Modify

High emphasis

Tabs are available in two emphasis variants: low and high. Use low emphasis as the default variant in most cases. It gives the tab set a clear structure while keeping the visual expression calm. Use high emphasis when the active tab needs more prominence, for example when tabs are used to separate important views or support multiple hierarchical levels in the interface.

High emphasis – 1

Example of a tab set with a more prominent selected tab.

High emphasis – 2

Example of a tab set with a less prominent selected tab.

The high emphasis variant can be useful when tabs are used across multiple hierarchical levels and the active tab needs to stand out more clearly.

High emphasis

Example of a design with tabs separating content of multiple hierarchical levels.

Stretched labels

The width of the label can either be determined by the length of the text content, or alternatively the labels extend to fill the available horizontal space.

Stretched labels – 1

Default

Stretched labels – 2

Stretched labels

Label text

Text labels should be clear and concise in order to properly guide the user to their desired content.

Label text – 1
Label tabs to clearly indicate what the associated content contains.
Label text – 2
Don’t label tabs in a unclear manner.

Closable labels

Labels can be configured to be closable, typically along with the associated content. In this variant a icon button is added to the right edge of the label. In the stretched label variant he label text is adjusted to the left.

Closable labels

Example of tabs with closable labels

ComponentsTable / Changelog
ComponentsTabs / Code

© DesignTech - AB Svenska Spel

What's newTerms of useAccessibility statementCookiesTeams channel [Internal]@svenskaspel/ui version
4.4.0

Feedback

We always want to improve the Design System and would be thrilled to get your feedback.

Please share your wisdom with us.

Microsoft Teams [internal]

Designsystem@svenskaspel.se