Navigation
A component for creating lists of navigational items to be used within the layout's sidebar.
| Property | Description | Type |
|---|---|---|
NavItem href | Where the item links to. Required. | string |
NavItem active | Marks the item as the current page (sets aria-current). | boolean |
NavItem slot="icon" | Icon before the label. Receives animate, true while the item is hovered or keyboard-focused. | slot |
NavItem on:click | Fires when the item is clicked, for example to close the mobile menu. | event |
NavGroup title | Heading of the collapsible group. Required. | string |
NavGroup open | Whether the group starts expanded. Defaults to true. | boolean |
NavGroup icon | Snippet rendered before the title. Receives the same animate flag. | Snippet<[boolean]> |
NavGroupItem href | Where the item links to. Required. | string |
NavGroupItem active | Marks the item as the current page (sets aria-current). | boolean |
NavGroupItem slot="icon" | Optional icon before the label. Receives animate. | slot |
NavGroupItem on:click | Fires when the item is clicked. | event |