Components

Tabs ​

Tabs organize related content into compact sections without leaving the current view.

Basic Usage ​

Use standard tabs for the most common inline section switching pattern.

Pane Tabs ​

Pane tabs are useful inside taller bounded regions where the tab list and content live together in the same panel.

Modal tabs adapt the same pattern to dialog layouts where the tab content needs a slightly different structure.

variant="sidebar" is the Craft-style vertical nav — group with pk-tab-heading, and optionally slot icon / status on each pk-tab.

Disabled and Overflow ​

Disabled tabs and scrollable tab lists — default, pane, and modal variants.

API ​

pk-tabs ​

Slots ​

NameDescription
navpk-tab triggers and optional pk-tab-heading group labels
(default)pk-tab-panel content panels

Attributes & Properties ​

NameDescription
activationmanual — arrow keys move focus only; Enter/Space activates (Base UI default). auto — arrow keys activate tabs immediately.
Type PkTabsActivation
Default manual
ariaLabel aria-labelType string | null
Default null
disabledType boolean
Default false
orientationType PkTabsOrientation
Default horizontal
placementType PkTabsPlacement
Default top
valueType string
variantVisual style — default (segmented), pane, modal, or sidebar (vertical nav).
Type PkTabsVariant
Default default

Events ​

NameDescription
pk-changeActive tab changed.
pk-tab-hideA tab panel became hidden.
pk-tab-showA tab panel became visible.

CSS Parts ​

NameDescriptionCSS selector
baseRoot container::part(base)
listTab list::part(list)

pk-tab ​

Slots ​

NameDescription
(default)Tab label
iconOptional leading content (icon, logo, etc.)
statusOptional trailing content (status dot, badge, etc.)

Attributes & Properties ​

NameDescription
disabledType boolean
Default false
focusIndex focus-indexType number
Default -1
panelIdType string | undefined
selectedType boolean
Default false
valueType string

Methods ​

NameDescription
focusControl()—

Events ​

NameDescription
pk-tab-keydown—
pk-tab-select—

CSS Parts ​

NameDescriptionCSS selector
iconIcon slot wrapper (hidden when empty)::part(icon)
labelLabel slot wrapper::part(label)
statusStatus slot wrapper (hidden when empty)::part(status)
triggerTab button::part(trigger)

pk-tab-heading ​

Slots ​

NameDescription
(default)Heading text

CSS Parts ​

NameDescriptionCSS selector
headingHeading container::part(heading)

pk-tab-panel ​

Slots ​

NameDescription
(default)Panel content

Attributes & Properties ​

NameDescription
hiddenType boolean
Default true
tabIdType string | undefined
valueType string

CSS Parts ​

NameDescriptionCSS selector
contentPanel container::part(content)
Edit this page
Last updated: Sep 9, 2026, 7:18 PM