Skip to main content

Static Menu

The static menu is the simplest way to create a menu where you render the menu components directly in your code without any dynamic data source. It is useful when you have a fixed set of menu items that do not change based on external factors.

Example

/vertical-menu/menu-render/static-menu

Source Code

'use client'

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

const StaticMenu = () => {
return (
<VerticalNav customBreakpoint='200px'>
<Menu menuItemStyles={{ button: { paddingBlock: '12px' } }}>
<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 StaticMenu