Skip to main content

Background Color

The backgroundColor prop allows you to add a custom background color for the navigation sidebar. The value of this prop can be any valid CSS value for background-color.

Props

backgroundColor?: string
Default Value
backgroundColor='white'

Example

Source Code

'use client'

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

const BackgroundColor = () => {
return (
<VerticalNav customBreakpoint='200px' backgroundColor='#b1b0b0'>
<Menu>
<SubMenu label='Dashboards'>
<MenuItem>Analytics</MenuItem>
<MenuItem>eCommerce</MenuItem>
</SubMenu>
<MenuItem>Calendar</MenuItem>
<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>
</Menu>
</VerticalNav>
)
}

export default BackgroundColor