DocsBlog

Get Started

Components

Data Grid

Signals

Styling

Theming

↑↓Navigate
↵Select
EscClose
  • 1.8.0

  • Day

    Night

    Preview

    Switch mode
  • cerberus

    acheron

    elysium

    oceanus

Get Started
Components
Data Grid
Signals
Styling
Theming

Concepts

OverviewCompositionCerberus ContextTesting

Layout

Aspect RatioBleedBoxCenterContainerContainer QueryDividerFlexFloatGridGroupLink OverlayScrollableStackWrap

Components

AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTA ModalDate PickerDialogFieldFieldsetFile UploaderIconButtonInputLoading StatesMarqueeMenuNotificationsNumber InputPaginationPin InputPopoverProgress IndicatorsPrompt ModalRadioRatingSelectSliderSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

Utilities

Client OnlyDownload TriggerEnvironmentFeature FlagsFocus TrapForFormat ByteFormat NumberFormat Relative TimeFormat Relative TimeFrameHighlightJSON Tree ViewLocalePortalPresenceShowSwapsplitPropsTheme

Tabs

The Tabs component is used to create a tabbed interface.

  • npm
  • source
  • recipe
  • Ark
View as Markdown
Open this page in Markdown
Anthropic
Open in Claude
Ask questions about this page
OpenAI
Open in ChatGPT
Ask questions about this page

Import

import { Tabs } from '@cerberus/react'

Usage

The Tabs component is used to create a tabbed interface.

Loading example...

Palette

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

Loading example...

Orientation

Use the orientation prop to render tabs vertically. The indicatorPlacement prop can be set to "start" (it defaults to "end").

Loading example...

Primitives

You can utilize the primitive components or the css prop 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.
Loading example...

API

Props

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

NameDefaultDescription
paletteactionThe color palette of the tabs
orientationhorizontalThe orientation of the group.
indicatorPlacementendThe position of the active tab indicator. Placement follows the orientation flow: start renders at the start edge (top or left), end at the end edge (bottom or right).

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.

Note

Although the Tabs API is similar to the TabsParts, it returns abstractions of the primitives. The TabsParts return the primitives only.

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.

Note

It is best to only use the TabsParts if you are building a custom solution. Importing Object based components will ship every property it includes into your bundle, regardless if you use it or not.

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.

On this page

  • Import
  • Usage
  • Palette
  • Orientation
  • Primitives
  • API
    • Props
      • Tabs component parts
    • Parts
Edit this page on Github
Overview content
Features content
Pricing content
Overview content
Features content
Pricing content
Overview content
Features content
Pricing content
A peaceful and quiet region of the underworld.
A paradise for the souls of the heroic and the virtuous.
A deep abyss used as a dungeon of torment and suffering.