• Docs
  • Blog
    • 0.24.0

    • Switch to dark mode
    Get Started
    Components
    Styling
    Theming

    Concepts

    OverviewCompositionTesting

    Layout

    Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrap

    Components

    AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsNumber InputPin InputProgressPrompt ModalRadioRatingSelectSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

    Utilities

    Feature FlagsForLocal StoragePortalShowsplitPropsTheme

    Tabs

    The Tabs component is used to create a tabbed interface.

    • npm
    • source
    • recipe
    • Ark
    import { Tabs } from '@cerberus/react'

    Usage

    The Tabs component is used to create a tabbed interface.

    Overview content
    Features content
    Pricing content

    Palette

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

    Overview content
    Features content
    Pricing content

    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.
    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.

    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.

    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

    • Edit this page on Github
    Cerberus Design System | Docs