Menu
PanelMenu
Sections of navigation that expand in place, each a tree of its items, for a sidebar.
WAI-ARIA tested
Import
main.ts
import { PanelMenu } from '@vitral/vue';Basic
Last command: —
Several open
API
Read from packages/vue/src/components/PanelMenu/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| model | MenuItem[] | The sections; each section's `items` form its tree, to any depth. |
| multiple | boolean | Let several sections be open at once. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| panel-open | event: { originalEvent: Event; item: MenuItem } | — |
| panel-close | event: { originalEvent: Event; item: MenuItem } | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| item | (props: { item: MenuItem; root: boolean; expanded: boolean; hasSubmenu: boolean }) | A section header's or an item's content. |
| headericon | (props: { item: MenuItem; expanded: boolean }) | — |
| submenuicon | (props: { item: MenuItem; expanded: boolean }) | — |