Skip to main content

Sub Menu Open Behavior

The subMenuOpenBehavior prop allows you to control how submenus behave when opened. It provides two options for controlling the behavior of submenus: accordion and collapse.

BehaviorDescription
accordionOnly one submenu can be open at a time. When a submenu is opened, any other open submenus will automatically close.
collapseMultiple submenus can be open simultaneously. Each submenu operates independently, and opening one submenu does not affect others.

Props

subMenuOpenBehavior?: 'accordion' | 'collapse'
Default Value
subMenuOpenBehavior='accordion'

Example

/vertical-menu/menu/sub-menu-open-behavior

Source Code