Skip to main content

Tabs

Tabs is a stateless component. This means that you will need to provide that stateful wrapper around it. You'll need to provide the activeDataId prop back to the component on each onTabClickAlso, the tab content will need to be swapped out when the active tab changes.
Result
Loading...
Live Editor

Variants​

Tabs​

Tabs will be rendered as a list of underlined elements.

Result
Loading...
Live Editor

Underline​

Underline will be rendered similiarly to tabs but will have a solid underline across all tabs.

Result
Loading...
Live Editor

Pills​

Pills will be rendered as a list of rounded elements.

Result
Loading...
Live Editor

Vertical​

Vertical tabs will always be rendered as pills.

Result
Loading...
Live Editor

Sizes​

Tabs can be rendered as small, medium (default), or large.

Result
Loading...
Live Editor

TabNav​

The TabNav component is used within Tabs but can also be used by itself to create more customized tabs.

Result
Loading...
Live Editor

Best Practices​

  • Keep tab labels concise, but descriptive.
  • Avoid using a group of tabs that will exceed the width of the content area at the smallest desktop resolution.
  • Use Title Case for tab text.
  • Items in a tab group should be ordered by priority or hierarchy. For longer groups (10 items or greater), consider using alphabetical order.
  • Avoid using the same word to start multiple tabs within the group.

Analytics​

The Tabs component is trackable through Kyber Analytics. This is the default analytics config.

export default {
value: 'Tabs',
actions: {
onTabClick: { type: 'TABS_ONTABCLICK', payload: 'Click' },
},
};

Props​

Tabs​

TabNav​

Tab​