Skip to content
Nana UI

Tab Panel

A content panel controlled by a nana-tab inside a nana-tab-group. Following the WAI-ARIA tabs pattern, the panel is only made focusable (tabindex="0") when it contains no focusable content of its own, so keyboard users always have a way to reach the panel without an extra stop.

Tab This is a tab panel.
Terminal window
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/tab-panel";
<nana-tab-group style="width:100%">
<nana-tab slot="nav" panel="a">Tab</nana-tab>
<nana-tab-panel name="a">This is a tab panel.</nana-tab-panel>
</nana-tab-group>
PropertyTypeDefaultDescription
namestring''The panel’s name (matches a tab’s panel).
activebooleanfalseWhether the panel is currently shown (managed by the group).
panelIdnana-tab-panel-${++panelIdCounter}Stable id for the tab/panel aria relationship.
SlotDescription
(default)The panel’s content.
VariableDefaultDescription
--nana-tab-panel-paddingPadding around the panel content.
PartDescription
baseThe panel’s host container
Explore Tab Panel interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook