Skip to content

DashboardLayout API

API reference docs for the React DashboardLayout component. Learn about the props, CSS, and other APIs of this exported module.

Demos

Import

import { DashboardLayout } from '@toolpad/core/DashboardLayout';
// or
import { DashboardLayout } from '@toolpad/core';

Learn about the difference by reading this guide on minimizing bundle size.

Props

Props of the native component are also available.

NameTypeDefaultDescription
children*node-

The content of the dashboard.

branding{ logo?: node, title?: string }null

Branding options for the dashboard.

defaultSidebarCollapsedboolfalse

Whether the sidebar should start collapsed in desktop size screens.

disableCollapsibleSidebarboolfalse

Whether the sidebar should not be collapsible to a mini variant in desktop and tablet viewports.

hideNavigationboolfalse

Whether the navigation bar and menu icon should be hidden

sidebarExpandedWidthnumber
| string
320

Width of the sidebar when expanded.

slotProps{ sidebarFooter?: { mini: bool }, toolbarAccount?: { localeText?: { iconButtonAriaLabel?: string, signInLabel?: string, signOutLabel?: string }, slotProps?: { popover?: object, popoverContent?: object, preview?: object, signInButton?: object, signOutButton?: object }, slots?: { popover?: elementType, popoverContent?: elementType, preview?: elementType, signInButton?: elementType, signOutButton?: elementType } }, toolbarActions?: object }{}

The props used for each slot inside.

slots{ sidebarFooter?: elementType, toolbarAccount?: elementType, toolbarActions?: elementType }{}

The components used for each slot inside.

See Slots API below for more details.

sxArray<func
| object
| bool>
| func
| object
-

The system prop that allows defining system overrides as well as additional CSS styles.

See the `sx` page for more details.

The component cannot hold a ref.

Slots

Slot nameClass nameDefault componentDescription
toolbarActionsToolbarActionsThe toolbar actions component used in the layout header.
toolbarAccountAccountThe toolbar account component used in the layout header.
sidebarFooternullOptional footer component used in the layout sidebar.

Source code

If you did not find the information in this page, consider having a look at the implementation of the component for more detail.