NavItem
layoutsA sidebar link or button with icon, label and a trailing count that collapses to an icon and a dot when its sidebar narrows to a rail.
Mail folders
active marks the current folder and takes the accent badge; badge counts hide at 0.
Active styles, badge tones and glyphs
activeStyle="fill" | "bar"; badgeTone neutral, ok, warn, danger, info; the glyph comes from icon, iconPath or iconChildren.
Long labels and large counts
Labels truncate with the full text in title; badge accepts text as well as numbers; 0 and empty strings render no badge.
Icon rail and tab orientation
Inside a sidebar query container at 8rem or less the label hides and the badge becomes a dot; orientation="vertical" stacks icon over label for bottom tabs.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
icon | IconName | — | |
iconChildren | Snippet | — | Raw 24×24 SVG content, for glyphs outside the registry. Wins over `iconPath` and `icon`. |
iconPath | string | — | Single `<path d>` for a 24×24 outline glyph. Wins over `icon`. |
iconSize | number | 18 | |
label required | string | — | |
href | string | — | |
active | boolean | false | |
activeStyle | 'fill' | 'bar' | 'fill' | 'fill' = accent-tinted pill with a rounded left marker; 'bar' = lighter tint with a flat 2px inset accent bar. |
onclick | (e: MouseEvent) => void | — | |
badge | string | number | — | Optional trailing count pill (e.g. unread / missing items). When the item is `active` it adopts the accent fill; otherwise it uses `badgeTone`. |
badgeTone | BadgeTone | 'neutral' | Tone for the trailing badge when the item is not active. |
orientation | 'horizontal' | 'vertical' | 'horizontal' | `vertical` stacks the icon over the label with the badge overlaid on the icon corner (bottom tab bars). |
children | Snippet | — | |
class | string | '' | |
style | string | — |