Balance Logo
Balance
Reckon Design System
Open playroom

Tabs

Tabs are used to navigate between related pages or views while retaining context.
Install
pnpm add @balance-web/tabs
Import usage
import {
useTabList,
useTabListState,
useTabListEventListeners,
TabList,
TabItem
} from '@balance-web/tabs';
  • Code
  • API

Usage

Exposes both a set of visual primitives that have the appearance of tabs along with helpers to create semantic tabs.

This allows the tabs to be used as navigational elements or as semantic tab elements.

Edit in Playroom

Usage as semantic tabs

The useTabListState hook expects a type of HTMLDivElement (the live editor won't allow types).

Usage as navigational elements

To use the tab components as navigational elements, you can use the as prop. The example below shows using regular a elements, you can also use a client side routed link component such as NextLink from @balance-web/next-link though.

Copyright © 2024 Reckon. Designed and developed in partnership with Thinkmill.
Bitbucket logoJira software logoConfluence logo