Tab
@astryxdesign/core v0.7.1 · Tab
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Unique value of this tab. The surrounding TabList matches its own value against it to decide the selection. Required. |
label | string | — | Visible text. The default slot wins when both are given, and this prop becomes the accessible name while the label is hidden. |
panelId | string | — | ID of the panel this tab controls, for aria-controls. Only used when the strip is a role="tablist". |
disabled | boolean | false | Whether the tab is disabled. Keyboard navigation skips it. |
href | string | — | URL to navigate to. Outside the tabs pattern the tab renders as a link. Ignored inside a role="tablist" strip. |
as | NavLinkComponent | 'a' | Link root component, such as a router link. Only applies when there is an href and the strip is not a tablist. |
isLabelHidden | boolean | false | Hides the label visually. Only the icon and the end content show, and label becomes the accessible name. |
Slots
default: the label text. Falls back to thelabelprop.icon: icon shown while the tab is not selected.selectedIcon: icon shown while the tab is selected. Falls back toicon.endContent: content after the label, such as a badge count or a status dot.