Skip to main content

Collapsed Menu Section Label

When the menu is collapsed, the collapsedMenuSectionLabel prop can be used to display a custom label for each menu section.

Props

collapsedMenuSectionLabel?: ReactNode;

Example

Source Code

'use client'

// Component Imports
import VerticalNav, { Menu, MenuItem, MenuSection, SubMenu } from '@menu/vertical-menu'

const CollapsedMenuSectionLabel = () => {
return (
<VerticalNav customBreakpoint='200px' defaultCollapsed>
<Menu>
<MenuSection label='Dashboards & Apps'>
<SubMenu label='Dashboards'>
<MenuItem>Analytics</MenuItem>
<MenuItem>eCommerce</MenuItem>
</SubMenu>
<MenuItem>Calendar</MenuItem>
</MenuSection>
<MenuSection label='Others'>
<MenuItem>FAQ</MenuItem>
<SubMenu label='Menu Level'>
<MenuItem>Menu Level 2.1</MenuItem>
<SubMenu label='Menu Level 2.2'>
<MenuItem>Menu Level 3.1</MenuItem>
<MenuItem>Menu Level 3.2</MenuItem>
</SubMenu>
</SubMenu>
<MenuItem>Documentation</MenuItem>
</MenuSection>
</Menu>
</VerticalNav>
)
}

export default CollapsedMenuSectionLabel