ComponentsTabs

Tabs

A Tab is a graphical control element that allows multiple documents or panels to be contained within a single window. Tabs can be used as a navigational widget for switching between sets of documents.

GitHub LogoSource Code

Usage

The HvTabs is controlled via the value and onChange props. The value prop uses the tab’s index by default, or HvTab’s value if provided.

Page 1 content

Variants

The tabs supports fullWidth and scrollable variants, based on the MUI Tabs component.

Icons

Add icons to tabs using the icon and iconPosition props in HvTab.
To display icon-only tabs, set the label prop to undefined.

Icon position:

Custom labels

The label prop on the HvTab component is a ReactNode and can be used to render any content, for example badges.

Floating

To use the tabs in floating mode set the floating prop to true.