<cs-tab>
StableNavigationSince 0.1

Tabs label and activate an individual panel inside a tab group.

This component must be used as a child of <cs-tab-group>. Please see the Tab Group docs to see examples of this component in action.

API

Importing

If you're using the autoloader or a hosted project, components load on demand — no manual import needed. To cherry-pick this component, use one of the following snippets.

npm Self-Hosted React
import '@cruglobal/cornerstone-components/components/tab/tab.js';
import './cornerstone/components/tab/tab.js';
import CsTab from '@cruglobal/cornerstone-components/react/tab/index.js';

Slots

Learn more about using slots.

NameDescription
(default)The tab's label.

Attributes & Properties

Learn more about attributes and properties.

PropertyAttributeDescriptionTypeDefaultReflects
disableddisabledDisables the tab and prevents selection.booleanfalseYes
panelpanelThe name of the tab panel this tab is associated with. The panel must be located in the same tab group.string''Yes

CSS Parts

Learn more about CSS parts.

NameDescriptionCSS selector
tabThe component's outer wrapper.::part(tab)