ConsoleShell
ConsoleShell is a dashboard frame with a collapsible sidebar, a compact navigation drawer, and an inset workspace card. Brand, navigation, and account slots stay empty so the shell can be reused without a product identity.
import { ConsoleShell } from '@lobehub/ui/dashboard';Default
The sidebar collapses to an icon rail, and folds into a drawer below the laptop breakpoint. Mod+B toggles it while focus is inside the shell. Pass storageKey to remember the rail.
APIs
ConsoleShell
brandnull | string | number | bigint | false | true | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>Home mark. Rendered at the top of the sidebar.
breadcrumbnull | string | number | bigint | false | true | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>Location shown in the top bar, usually a `Breadcrumb`.
childrennull | string | number | bigint | false | true | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>collapsedbooleanCollapse the sidebar to an icon rail. Ignored while compact.
collapseLabelstringDefaults to
"Collapse sidebar".defaultCollapsedbooleanDefaults to
false.expandLabelstringDefaults to
"Expand sidebar".footernull | string | number | bigint | false | true | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>Account menu or other content pinned to the bottom of the sidebar.
hotkeybooleanCollapse and expand with Mod+B while focus is inside the shell.
Defaults to
true.navigationnull | string | number | bigint | false | true | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>Grouped navigation. Collapsed state comes from the shell.
onCollapsedChange(collapsed: boolean) => voidopenNavigationLabelstringDefaults to
"Open navigation".skipToContentLabelstringDefaults to
"Skip to content".storageKeystringPersists the collapsed rail. Omit to keep the choice in memory only.
toolsnull | string | number | bigint | false | true | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>Actions at the end of the top bar.
Also accepts all native HTML and ARIA attributes.
ConsoleBrand
hrefstringDefaults to
"/".labelstringAccessible name for the home link. Defaults to `title`.
logoRequiredReactNodeMark shown on its own when the sidebar is an icon rail.
renderLink(props: ConsoleBrandLinkProps) => ReactNodeRenders the home link. Use this to plug in a router `Link`. The default render is an anchor.
titlenull | string | number | bigint | false | true | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>Name beside the mark. Omit when `logo` already includes the wordmark, such as a combine lockup.