Components
BaseSectionNav
A vertical list of sections for settings-like pages that turns into a select on small screens.
components/ui/BaseSectionNav.vue
View in the demo
Example
Resize the window below the md breakpoint (or the one set in list-from) to see it become a select.
Security
Pick a section on the left.
Account settings and the help center use it, synced with the ?tab= query. The active section gets a neutral background and dark text, so the primary colour stays for the page buttons.
Items
Field | Description |
|---|---|
value | The id of the section, used by v-model. |
title | The row text. Rows are a single line by default. |
subtitle | An optional second line, for short menus or unfamiliar sections. Do not repeat the description the content header already shows. |
icon | A Lucide icon. |
tileColor | Shows the icon in a coloured BaseIconTile instead. |
color | Tints only the icon (error, warning, success, info, primary). The text stays neutral, so a danger zone does not compete with the active section. |
divider | Draws a divider before the row, for example to set the danger zone apart. |
subheader | A group heading before the row, for long menus. |
badge, badgeColor, badgeVariant | A counter at the end of the row. It is solid (flat) by default so it reads on the active row; use tonal for neutral counts, as the help center does. |
API
Props
Name | Type | Default | Description |
|---|---|---|---|
itemsrequired | BaseSectionNavItem[] | — | The sections. |
label | string | — | The accessible name of the navigation. |
list-from | "md" | "lg" | "xl" | "md" | The breakpoint (md, lg or xl) from which the list shows; below it the menu is a select. Raise it when the column beside the app sidebar is too narrow, as the landing blocks showcase does with xl. |
v-model | string | — | The active section. |
Events
Name | Payload | Description |
|---|---|---|
@update:modelValue | [value: string | undefined] | The section the user picked. |