Skip to content

Tabs

Props

API reference for Tabs. For usage examples, see the React tab.

Tabs.Root

NameTypeDefault
alignment"center" | "left" | "right"left

Determines the alignment of the Tabs.

childrenChildrenOrFunction<TabsRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

disabledKeysIterable<Key>

The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with.

fullWidthbooleanfalse

Determines if the Tabs should be a fluid full width.

isDisabledboolean

Whether the TabList is disabled. Shows that a selection exists, but is not available in that circumstance.

keyboardActivation"automatic" | "manual"'automatic'

Whether tabs are activated automatically on focus or manually.

Tabs.Item

NameTypeDefault
children (required)ReactNode

The children of the component. A function may be provided to alter the children based on component state.

downloadstring | boolean

Causes the browser to download the linked URL. A string may be provided to suggest a file name. See MDN (opens in new tab).

hrefstring

A URL to link to. See MDN (opens in new tab).

hrefLangstring

Hints at the human language of the linked URL. SeeMDN (opens in new tab).

isDisabledboolean

Whether the tab is disabled.

pingstring

A space-separated list of URLs to ping when the link is followed. See MDN (opens in new tab).

referrerPolicyHTMLAttributeReferrerPolicy

How much of the referrer to send when following the link. See MDN (opens in new tab).

relstring

The relationship between the linked resource and the current page. See MDN (opens in new tab).

routerOptionsundefined

Options for the configured client side router.

targetHTMLAttributeAnchorTarget

The target window for the link. See MDN (opens in new tab).

Tabs.List

NameTypeDefault
children((item: object) => ReactNode) | ReactNode

The contents of the collection.

dependenciesreadonly any[]

Values that should invalidate the item cache when using dynamic collections.

itemsIterable<object>

Item objects in the collection.

Tabs.Panel

NameTypeDefault
children (required)ReactNode

The children of the component. A function may be provided to alter the children based on component state.

shouldForceMountbooleanfalse

Whether to mount the tab panel in the DOM even when it is not currently selected. Inactive tab panels are inert and cannot be interacted with. They must be styled appropriately so this is clear to the user visually.