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 contains the value of the HvTab, which is its index by default.

Page 1 content

Variants

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

Icons

You can use icons in the tabs by passing the icon and iconPosition props to the HvTab component. If you only want to show icons with no text, you can hide the labels by setting 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.