Nav Item
v0.4.0A single navigation link with an optional leading icon and active state. The `active` modifier is applied on the component's own root element (per BEM), so it can be dropped into any nav/sidebar layout.
A single navigation link with an optional leading icon and active state. The
active modifier is applied on the component's own root element (per BEM),
so it can be dropped into any nav/sidebar layout.
Usage
Compositions
Open all 2 →Properties
NavItem props
| Prop | Type | Default | Description |
|---|---|---|---|
active | boolean | false | Whether this item represents the current route |
children | ReactNode | — | Content to render inside the component |
className | string | — | Additional class names to merge with the component root element |
icon | ReactNode | — | Leading icon rendered before the content |
Also accepts the native attributes of its root element (className, aria-*, event handlers, …).