NAVIGATION
NavItem
Sidebar-row primitive used by the Damo UI docs nav and any sidebar that needs the unified selection chrome (gradient + 1px inset outline + 3px accent bar). Polymorphic by default via as.
Import
Basic list
With icons + adornment
Polymorphic — render as Link
Pass any element via as. NavItem forwards aria-current when active is true regardless of the rendered tag.
Props
NavItem props
| Prop | Type | Default | Description |
|---|---|---|---|
| as | ElementType | 'a' | Polymorphic element. Pass Link, button, or any component to control routing semantics. |
| active | boolean | — | When true, applies the selection chrome (gradient + outline + accent bar) and sets aria-current="page". |
| icon | ReactNode | — | Optional leading icon rendered inside a 20×20 slot. |
| endAdornment | ReactNode | — | Optional trailing element — typically a Badge marking new / beta / count. |
| tone | 'default' | 'onDark' | 'default' | default is the standard light/dark sidebar tone; onDark swaps the muted text and selection colors to the on-dark navbar palette (used inside AppTopBar). |
| children | ReactNode | — | Item label. |
Accessibility
- When
activeis set, NavItem appliesaria-current="page"— the canonical signal for "you are here" in a navigation list. - Default render is
<a>; for client-side routing passas={Link}(Next) or your router's link component. The selection chrome and class merging are preserved.