Skip to main content

Tabs

A component for toggling between related panels on the same page.

Manage your account settings and preferences.

Features

Installation

typo3 ui:add tabs

Read more about installing Components and Primitives.

Examples

Vertical Orientation

Display tabs in a vertical layout.

Manage your account settings and preferences.

Disabled Tabs

Disable specific tabs to prevent interaction.

First tab content.

Manual Activation

Require pressing Enter or Space to activate tabs instead of activating on focus.

Press Enter to switch tabs.

API Reference

The following tables cover the available props of the Fluid Primitives. For a full list of available client side props and methods, see the Zag.js Machine API.

tabs.root

Provides shared tabs state and wraps the tab list and panels. Renders a <div> element.

NameDescriptionRequiredDefault
loopFocusboolean
Whether the keyboard navigation will loop from last tab to first, and vice versa.
No
true
defaultValuestring
The initial selected tab value when rendered. Use when you don't need to control the selected tab value.
No
-
orientationEnum\Orientation
The orientation of the tabs.
No
Horizontal
activationModeEnum\TabsActivationMode
The activation mode of the tabs.
No
Automatic
compositeboolean
Whether the tab is composite.
No
true
deselectableboolean
Whether the active tab can be deselected when clicking on it.
No
-

tabs.list

Groups the tab triggers. Renders a <div> element.

tabs.trigger

Activates a tab and focuses its panel. Renders a <button> element.

NameDescriptionRequiredDefault
valuestring
The value of the tab.
Yes
-
disabledboolean
Whether the tab is disabled.
No
-

tabs.indicator

Displays the active tab indicator. Renders a <div> element.

tabs.content

Displays the panel content for a tab. Renders a <div> element.

NameDescriptionRequiredDefault
valuestring
The value of the tab.
Yes
-

Anatomy

<primitives:tabs.root>
    <primitives:tabs.list>
        <primitives:tabs.trigger />
        <primitives:tabs.indicator />
    </primitives:tabs.list>
    <primitives:tabs.content />
</primitives:tabs.root>