NavigationRailItem
Navigation rail items are the destinations a navigation rail switches between.
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
badge | BadgeProps | No | — | A badge on the icon, the way Material 3 shows notifications on a destination: `{}` is the small dot, `{ label: 3 }` the count. Material recommends removing it once the destination has been viewed, which is the caller's call -- pass `undefined` when the item is selected. |
selected | boolean | No | false | Controlled selected state, used when no parent drives the selection. |
variant | "vertical" | "horizontal" | No | 'vertical' | Injected by the parent NavigationRail: layout direction of the item. |
index | number | No | — | Injected by the parent NavigationRail: position of this item in the rail. |
selectedItem | number | No | — | Injected by the parent NavigationRail: index of the currently selected item. |
isExtended | boolean | No | — | Injected by the parent NavigationRail: whether the rail is extended. |
extendedOnly | boolean | No | — | Injected by the parent NavigationRail: hide the item while the rail is collapsed. |