Components
BaseNavList
The navigation list of the app sidebars, with icons or coloured dots and counts shown as chips.
components/ui/BaseNavList.vue
View in the demo
Example
Inbox
12
Starred
3
Archive
0
Trash
2
Folders
Clients
5
Design
3
Contracts
2
Email folders and labels, the todo lists and the file manager sections and folders all render it, so the app sidebars share one design. The active row takes the primary colour and its count turns into a primary chip; the other counts stay neutral.
Use BaseSectionNav instead for the sections of a page such as settings: it has a neutral active row and turns into a select on small screens.
Items
Field | Description |
|---|---|
value | The id sent with select. |
title | The row text. |
icon | A Lucide icon. |
dot | A colour for a BaseDot instead of the icon, for folders. It keeps the text aligned with the icon rows. |
color | Tints the icon and the active row, for coloured labels. |
count | A counter shown as a chip at the end of the row. |
active | Marks the row as the current one (aria-current="page"). |
divider | Draws a divider before the row. |
API
Props
Name | Type | Default | Description |
|---|---|---|---|
itemsrequired | BaseNavListItem[] | — | The rows. |
title | string | — | A small uppercase heading above the list. It also names the list when label is missing. |
label | string | — | The accessible name of the list. |
hide-zero | boolean | false | Hides counts that are 0, as the email folders do. |
Events
Name | Payload | Description |
|---|---|---|
@select | [value: string] | The value of the row the user picked. |