Back to SideMenu
SideMenu

Controlled

External buttons drive the active selection.

Selected: overview

API

PropTypeDefaultDescription
itemsSideMenuNode[]Tree of menu items with optional childNodes.
selectedItemstringControlled active parent id.
selectedChildItemstringControlled active child id.
onMenuItemClick(payload: { id: string; parent?: { id: string } }) => voidFires when a parent or child row is activated.
widthstring | number190pxMaximum width of the menu.
disabledbooleanfalseDisables interaction for the entire menu.
noItemsTextstringNo items to showEmpty-state copy when items is empty.
classNamestringMerged onto the root `<nav>` element.
styleReact.CSSPropertiesInline styles on the root `<nav>` element.
id / title / icon / badge / badgeVariant (SideMenuNode)variousFields on each parent menu item.
childNodes (SideMenuNode)SideMenuChildNode[]Nested rows shown when the parent is expanded.
value / valueClassName / icon (SideMenuChildNode)variousOptional trailing value or icon on child rows.
disabled (SideMenuNode / SideMenuChildNode)booleanDisables an individual row.
onIconClick (SideMenuNode)(item, event) => voidOptional handler on the trailing parent icon.
View full API on SideMenu

More SideMenu examples