Tabs
Switch between related views in place.
Docs and catalog sidebar only: title, grouped text-only links, optional decorative icons and muted counts on group and subgroup headers only, an active page pill and optional footer links. Not product chrome, which is SideNav; AppNav is its deprecated alias.
Vertical sidebar for the docs catalog: text-only rows, a grouped catalog or a flat list. For product chrome use SideNav. Not AppHeader. Formerly AppNav.
Groups collapse one at a time. Active leaf uses aria-current=page.
Use for a docs or catalog sidebar only. Product app chrome is SideNav. Use NavigationMenu for horizontal site nav. Use Tabs for in-page panels.
Override on :root, a wrapper, or the component's className / style, e.g. .myNav { --docsnav-width: var(--layout-sidebar); }. Set them to semantic tokens, never hex. Listed under cssVars in the contract.
| Variable | Controls (default) |
|---|---|
--docsnav-width | Nav width (calc(layout-sidebar + space-2 × 2), 15rem) |
--docsnav-padding | Inner padding (space-4) |
--docsnav-background | Background (surface-card) |
--docsnav-item-gap | Gap between groups, rows and sub-rows (space-1) |
--docsnav-item-padding | Padding of links, group toggles and subgroup labels (space-2 space-3) |
--docsnav-item-radius | Link corners (radius-control-md) |
--docsnav-item-active-background | Active link fill (action-primary at 10% over surface-card) |
--docsnav-item-active-text | Active link text (action-primary) |
import { DocsNav } from "agentic-ds-kit";From contracts/docsnav.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| title | string | No | — | — |
| items | array | No | — | Flat list for simple shells. Ignored when groups is provided. |
| groups | array | No | — | Grouped catalog nav. Takes precedence over items when present. Groups collapse. Without openGroups it is an accordion: one group open at a time, the one holding the active page, or the first with defaultOpen. defaultOpen sets the initial group when no leaf is active. |
| openGroups | string[] | No | — | Controlled open groups, by label. Any number can be open at once, and the nav never opens or closes a group itself. Pair it with onOpenGroupsChange. Leave it out for the accordion. |
| onOpenGroupsChange | function | No | — | (openGroups: string[]) => void. Called with the next open labels, in nav order, when a group header is pressed. Used with openGroups. |
| footerLinks | array | No | — | Optional links under a hairline at the bottom of the nav (repo, package, changes), rendered with kit Link variant standalone. external opens a new tab with Link's external icon and "(opens in a new tab)"; others stay in the same tab. Left out, nothing renders. |
Switch between related views in place.
Horizontal site nav.
Path to the current page as a hierarchy of links.
Product side nav: brand header, icon items, optional badges, closeable; variant single (one column that closes to an icon rail) or rail-subnav (a fixed icon rail plus a SideNav.SubNav column with the picked parent's rows).