- Change props in the Controls panel below. Sidebar position:{" "} - {args.sidebarPosition ?? "none"}. -
-Desktop: expandable and collapsible
-- Click the menu icon in the header to expand or collapse the - sidebar. When collapsed, this content area grows to use the full - width. Use defaultSidebarOpen to start with the - sidebar open. -
-- This is the main content area. The menu bar is on the right and - is searchable with multi-label nested items. Resize the window - to see the responsive behavior: on small screens the sidebar - becomes a drawer. -
-- Sidebar is on the left. Put LayoutSidebar before LayoutMain in - LayoutBody for left position. -
-
- Hover and active states use menuItemClassName and{" "}
- activeItemClassName (e.g. primary colors).
-
- Use sidebarPosition={null} for no sidebar. The header - toggle is hidden and LayoutSidebar would render nothing if used. -
-- When you don’t pass a footer (or pass null), no footer is rendered. -
-- Menu can be a flat list of items instead of groups. -
-
- {menuDataStructureCode}
-
- + Default layout with a left sidebar. Toggle with the header button or Cmd+B. +
+
+ Pass side="right" to LayoutSidebar to place it on the right.
+
+ Sidebar starts collapsed showing only icons. Hover an icon to see its tooltip. + Click the header toggle or press Cmd+B to expand. +
+
+ Pass items instead of groups for a flat list without section headers.
+
+ Click a leaf menu item to change the active state. The current active item + is {activeId}. +
+
+ Use menuItemClassName and activeItemClassName to
+ customise hover/focus and active colours.
+
+ Pass searchable to LayoutMenu to show a search
+ input at the top of the sidebar. Type to filter menu items in real time.
+
+ Without the searchable prop, the sidebar shows only the
+ menu items with no search input.
+
+ Place LayoutHeader inside LayoutMain so it
+ only spans the content area, not the sidebar.
+
+ Use SidebarHeader and SidebarFooter inside{" "}
+ LayoutSidebar to add branding at the top and user info at the bottom.
+ These sections stay fixed while the menu scrolls.
+
+ The button above lives outside the Layout tree but toggles the sidebar
+ via doAction("myapp_layout_toggle"). Set the namespace prop
+ on Layout to control the hook name.
+