Tabs

Tabs organize content across different screens and views

import { Tabs } from '@cerberus/react'

Usage

The Tabs component is used to create a tabbed interface.

Overview content

Palette

The palette prop can be used to change the color of the Tabs.

Overview content

Primitives

You can utilize the primitive components to customize the tabs.

ComponentDescription
TabsRootThe context provider for the tabs parts
TabsListThe list container of the tabs
TabsTriggerThe tab components of the tabs
TabsIndicatorThe indicator of the active tabs state
TabsContentThe panel container for the tabs.
A peaceful and quiet region of the underworld.

API

Props

The Tabs component is an abstraction of the primitives and accepts the following props:

NameDefaultDescription
paletteactionThe color palette of the tabs

The Tabs.Root component also accepts all the props of the TabsRoot primitive props

Tabs component parts

The Tabs API is an Object containing the full family of abstracted components.

NameDescription
RootAn abstraction of the TabsRoot.
ListAn abstraction of the TabsList and TabsIndicator.
TabAn abstraction of the TabsTrigger.
PanelAn abstraction of the TabsContent.

Parts

The TabsParts API is an Object containing the full family of components.

NameDescription
RootThe TabsRoot component which is the Provider for the family.
ListThe TabsList component which is the container for the tabs.
TriggerThe TabsTrigger component which is the tab component.
ContentThe TabsContent component which is the panel container.
IndicatorThe TabsIndicator component which displays based on the active state.