← Inventory
SubNavigation
Vertical secondary navigation for page subsections and settings-like layouts;
the <nav> landmark wrapping a {@link SubNavigationList} of links.
Usage
import { SubNavigation, SubNavigationLink, SubNavigationLinkProps, SubNavigationList, SubNavigationListProps, SubNavigationProps } from "@desk/ui/components/sub-navigation";Best practices
Reach for
SubNavigationfor a vertical in-page section/settings menu; horizontal router tabs areTabNavigation, the app-chrome shell isSidebar.Fill it with a
SubNavigationListof links — it already renders the<nav>landmark, so don't nest it inside another<nav>.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| active | boolean | false | Marks the current page — applies active styling and sets |
| asChild | boolean | false | Render the child element as the link instead of an |
| href | string | ||
| icon | LucideIcon | Leading icon shown before the label. |
Also exports
- component
SubNavigation - interface
SubNavigationLinkProps - component
SubNavigationList - type
SubNavigationListProps - type
SubNavigationProps
Composition
Builds on