Skip to content
Star

Px Nav List

The PxNavList component is a collapsible navigation list, commonly used in sidebars. It renders menu items, grouped links (with one level of depth), and separators, including active route highlighting.

Basic Usage

The component expects a data model (NavListItem[]) to render the links. It has no opinion on routing or authentication, so you must pass it the already filtered items.

Demo

Props

PropTypeDefaultDescription
modelNavListItem[]RequiredThe array of items that make up the menu.
collapsedbooleanfalseDefines whether the menu is shown in collapsed mode (icons only).
activePathstring""Current path, used to highlight the active link and auto-expand its group.
linkComponentstring | Component"a"Tag or component to use to render the links (e.g. RouterLink).

Events

  • @select: Emitted when the user clicks a navigation item. Receives the selected NavListItem object.

Built with VitePress