UNPKG

@mozaic-ds/vue

Version:

Mozaic-Vue is the Vue.js implementation of ADEO Design system

38 lines (26 loc) 1.38 kB
# MSidebarExpandableItem SidebarExpandableItem is a component that renders a sidebar item which can either expand to show a nested submenu or display a floating menu when the sidebar is collapsed. It supports optional icons, keyboard navigation, and accessibility attributes, and allows for custom submenu items via slots. ## Props | Name | Description | Type | Default | | --- | --- | --- | --- | | `label*` | The text displayed for the sidebar item in its expanded state. | `string` | - | | `menuLabel*` | The title shown at the top of the floating menu when the sidebar is collapsed. | `string` | - | | `icon` | A Vue component used to display an icon alongside the sidebar item. | `Component` | - | ## Slots | Name | Description | | --- | --- | | `default` | Contains one or more MSidebarNavItem components used to render the submenu items. The slot scope provides a `close` function that can be called to hide the floating menu. | ## Dependencies ### Used By - [DefaultCase.stories](../sidebar/stories) - [WithExpandOnly.stories](../sidebar/stories) - [WithProfileInfoOnly.stories](../sidebar/stories) ### Graph ```mermaid graph TD; DefaultCase.stories --> MSidebarExpandableItem WithExpandOnly.stories --> MSidebarExpandableItem WithProfileInfoOnly.stories --> MSidebarExpandableItem style MSidebarExpandableItem fill:#008240,stroke:#333,stroke-width:4px ```