TabPane
TabPaneContent view One focused view inside a tab group. Control its label, icon, availability, and individual appearance.
Layout & contentIn context
Design system
The summary keeps the important context in view.
Everything is ready for review.
No history yet.
Pane tone and variant style the content. tabVariant styles the control; the parent owns selection.
<Tabs group="layout-context-pane" selectedTab="layout-pane-summary" ariaLabel="Release views" variant="none" tabVariant="underline">
<TabPane id="layout-pane-summary" label="Summary" icon="lucide:layers" tone="feature" variant="surface" tabVariant="outline">
<h3>Design system</h3>
<p>The summary keeps the important context in view.</p>
</TabPane>
<TabPane id="layout-pane-checks" label="Checks" icon="lucide:check" tone="success" variant="surface">
<p>Everything is ready for review.</p>
</TabPane>
<TabPane id="layout-pane-locked" label="History unavailable" :disabled="true">
<p>No history yet.</p>
</TabPane>
</Tabs> Related views
Each pane needs a unique ID. Tabs owns the group and initial selection.
Preview release
The content is ready for review.
Review the source before publishing.
No previous releases.
<Tabs
group="pane-release"
selectedTab="pane-overview"
ariaLabel="Release information"
tabVariant="underline"
>
<TabPane id="pane-overview" label="Overview" icon="lucide:check">
<h3>Preview release</h3>
<p>The content is ready for review.</p>
</TabPane>
<TabPane id="pane-checks" label="Checks">
<Badge tone="success">All checks passed</Badge>
<p>Review the source before publishing.</p>
</TabPane>
<TabPane id="pane-history" label="History · unavailable" :disabled="true">
<p>No previous releases.</p>
</TabPane>
</Tabs> Independent panel styling
Pane variant styles the content surface; tabVariant styles the tab control.
A distinct panel surface.
A quiet alternative.
<Tabs group="pane-style" selectedTab="pane-details" ariaLabel="Styled views">
<TabPane
id="pane-details"
label="Details"
tone="accent"
variant="surface"
tabVariant="outline"
>
<p>A distinct panel surface.</p>
</TabPane>
<TabPane id="pane-notes" label="Notes" tone="neutral" variant="none">
<p>A quiet alternative.</p>
</TabPane>
</Tabs> All semantic tones
All ten supported tones. A semantic palette communicates intent; visible labels keep the meaning explicit.
neutral neutral content surface.
A second view.
accent accent content surface.
A second view.
feature feature content surface.
A second view.
secondary secondary content surface.
A second view.
custom custom content surface.
A second view.
ghost ghost content surface.
A second view.
info info content surface.
A second view.
success success content surface.
A second view.
warning warning content surface.
A second view.
danger danger content surface.
A second view.
Every value is visible. Compare treatments in the site’s light and dark themes.
All visual variants
All eighteen supported treatments, shown together. These examples style each pane’s content surface.
solid surface surface content surface.
A second view.
surfaceAlt surfaceAlt content surface.
A second view.
spotlight spotlight content surface.
A second view.
glass glass content surface.
A second view.
flat flat content surface.
A second view.
flatAlt flatAlt content surface.
A second view.
flatSolid outlineFill outline outline content surface.
A second view.
subtle subtle content surface.
A second view.
subtleBtn subtleBtn content surface.
A second view.
link link content surface.
A second view.
sheen underline underline content surface.
A second view.
rail bracket bracket content surface.
A second view.
none none content surface.
A second view.
Every value is visible. Compare treatments in the site’s light and dark themes.
Variant modes
Stateless shows the base treatment. Stateful includes hover, focus, and active styling; it does not add an action handler.
stateless stateless content surface.
A second view.
stateful stateful content surface.
A second view.
Every value is visible. Compare treatments in the site’s light and dark themes.
All tab-control treatments
tabVariant is independent of the content surface. Each example shows both a selected and an available control; click or use the keyboard to switch views.
solid solid content surface.
A second view.
surface surface content surface.
A second view.
surfaceAlt surfaceAlt content surface.
A second view.
spotlight spotlight content surface.
A second view.
glass glass content surface.
A second view.
flat flat content surface.
A second view.
flatAlt flatAlt content surface.
A second view.
flatSolid flatSolid content surface.
A second view.
outlineFill outlineFill content surface.
A second view.
outline outline content surface.
A second view.
subtle subtle content surface.
A second view.
subtleBtn subtleBtn content surface.
A second view.
link link content surface.
A second view.
sheen sheen content surface.
A second view.
underline underline content surface.
A second view.
rail rail content surface.
A second view.
bracket bracket content surface.
A second view.
none none content surface.
A second view.
Every value is visible. Compare treatments in the site’s light and dark themes.
Pane availability and labels
A text label, an optional icon, a disabled view, and label fallback to the ID are distinct pane features.
label, icon, disabled The initial selected view.
This view cannot be selected.
ID fallback Omitting label displays the pane ID.
Every value is visible. Compare treatments in the site’s light and dark themes.
Behavior and accessibility
Keep IDs unique across the document, including the generated -label and -panel suffixes. Disabled panes remain unavailable to selection. The standard tabs runtime supplies keyboard controls and responsive selection; content stays mounted while switching views.
API reference
TabPane contract
Props below are the public template API. RefOrValue accepts a literal or a reactive ref; bind refs with a colon-prefixed attribute. Native attributes and events can be passed through the component root.
id
string - Default
generated
Unique pane identity and base for its label/panel IDs.
label
RefOrValue<string> - Default
id
Visible tab label.
icon
RefOrValue<string> - Default
not set
Registered SVG icon name. In browser apps, include the icon in the resolver passed to defineIconComponents.
disabled
RefOrValue<boolean> - Default
false
Disables interaction. Use a bound boolean, for example :disabled="isLocked".
group
string - Default
parent Tabs group
Radio group. Usually inherit it from Tabs so selection stays coordinated.
tone
RefOrValue<SemanticTone> - Default
parent Tabs tone
Semantic intent: neutral, accent, secondary, info, success, warning, danger, feature, custom or ghost. The active skin supplies the colors.
variant
RefOrValue<ComponentVariant> - Default
none
Treatment of the pane content surface.
variantMode
RefOrValue<ComponentVariantMode> - Default
parent Tabs, then stateless
Use stateless for content surfaces; stateful enables the treatment’s hover, focus and active styles. It does not add interaction handlers.
tabVariant
RefOrValue<ComponentVariant> - Default
parent Tabs, then underline
Visual treatment for the tab control, independent of the panel variant.
Composition
Default slot: panel content. Place TabPane inside Tabs. Register defineTabsComponents and defineIconComponents; SSG includes the tabs runtime automatically.