A page layout shell with navigation, tools panel, drawers, and a toolbar grouping all triggers. — <cs-app-layout-toolbar>
<cs-app-layout-toolbar id="my-layout">
<div slot="navigation">
<cs-side-navigation></cs-side-navigation>
</div>
<div slot="breadcrumbs">
<cs-breadcrumb-group></cs-breadcrumb-group>
</div>
<div slot="content">
<cs-container header="Section">Content</cs-container>
</div>
<div slot="tools">Help content</div>
</cs-app-layout-toolbar>
<script>
const layout = document.getElementById('my-layout');
layout.toolbarDrawers = [
{ id: 'notifications', trigger: { iconName: 'notification' }, ariaLabels: { drawerName: 'Notifications' }, badge: true }
];
</script>
active-drawer-idstring | nullThe active drawer id. If you want to clear the active drawer, use null.
analytics-metadataAppLayoutProps.AnalyticsMetadataSpecifies additional analytics-related metadata.
instanceIdentifier - A unique string that identifies this component instance in your application.flowType - Identifies the type of flow represented by the component.
Note: This API is currently experimental.aria-labelsAppLayoutProps.LabelsAria labels for the drawer operating buttons. Use this property to ensure accessibility.
navigation (string) - Label for the landmark that wraps the navigation drawer.navigationClose (string) - Label for the button that closes the navigation drawer.navigationToggle (string) - Label for the button that opens the navigation drawer.notification (string) - Label for the region that contains notification messages.tools (string) - Label for the landmark that wraps the tools drawer.toolsClose (string) - Label for the button that closes the tools drawer.toolsToggle (string) - Label for the button that opens the tools drawer.drawers (string) - Label for the landmark that wraps the active drawer.drawersOverflow (string) - Label for the ellipsis button with any overflow drawers.drawersOverflowWithBadge (string) - Label for the ellipsis button with any overflow drawers, with a badge.Example:
{
navigation: "Navigation drawer",
navigationClose: "Close navigation drawer",
navigationToggle: "Open navigation drawer",
notifications: "Notifications",
tools: "Help panel",
toolsClose: "Close help panel",
toolsToggle: "Open help panel",
drawers: "Drawers",
drawersOverflow: "Overflow drawers",
drawersOverflowWithBadge: "Overflow drawers (Unread notifications)"
}
content-typeAppLayoutProps.ContentTypeDetermines the default behavior of the component based on some predefined page layouts. Individual properties will always take precedence over the default coming from the content type.
disable-content-header-overlapbooleanDisables overlap between contentHeader and content slots.
disable-content-paddingsbooleanIf true, disables outer paddings for the content slot.
drawersArray<AppLayoutToolbarProps.Drawer>Drawers property. If you set both drawers and tools, drawers will take precedence.
Each Drawer is an item in the drawers wrapper with the following properties:
iconName (IconProps.Name) - (Optional) Specifies the icon to be displayed.iconSvg (unknown) - (Optional) Specifies the SVG of a custom icon. For more information, see SVG icon guidelinesdrawerName (string) - Label for the drawer itself, and for the drawer trigger button tooltip text.closeButton (string) - (Optional) Label for the close button.triggerButton (string) - (Optional) Label for the trigger button.resizeHandle (string) - (Optional) Label for the resize handle.header-selectorstringCSS selector for the application header.
header-variant'default' | 'high-contrast'Determines the visual treatment for the breadcrumbs and notifications slots. Specifically:
default - Does not apply any visual treatment.high-contrast - Applies high-contrast to both slots. Use in conjunction with headerVariant="high-contrast" in ContentLayout.max-content-widthnumberMaximum main content panel width in pixels.
If set to Number.MAX_VALUE, the main content panel will occupy the full available width.
min-content-widthnumberMinimum main content panel width in pixels.
split-panel-openbooleanState of the split panel.
split-panel-preferencesAppLayoutProps.SplitPanelPreferencesControls the split panel preferences.
By default, the preference is { position: 'bottom' }.
On smaller screens, the panel is forced to the 'bottom' position and the 'side' preference becomes disabled.
split-panel-sizenumberThe size of the split panel in pixels.
sticky-notificationsbooleanIf true, the notification slot is rendered above the scrollable content area so it is always visible.
tools-hidebooleanIf true, the tools drawer is not displayed at all.
tools-openbooleanState of the tools drawer.
tools-widthnumberTools drawer width in pixels.
breadcrumbsUse this slot to add the breadcrumb group component to the app layout.
contentMain content.
contentHeaderTop area of the page content.
navigationNavigation drawer.
notificationsDisplayed on top of the main content in the scrollable area.
Conceived to contain notifications (flash messages).
splitPanelUse this slot to add the split panel component to the app layout.
Note: If provided, this property should be set to null or undefined if a split panel should not be rendered.
toolsTools drawer.
drawerChangeCustomEvent<AppLayoutProps.DrawerChangeDetail>Fired when the active drawer is toggled.
navigationChangeCustomEvent<AppLayoutProps.ChangeDetail>Fired when the navigation drawer is toggled.
splitPanelPreferencesChangeCustomEvent<AppLayoutProps.SplitPanelPreferences>Fired when the split panel preferences change.
splitPanelResizeCustomEvent<AppLayoutProps.SplitPanelResizeDetail>Fired when the split panel is resized.
splitPanelToggleCustomEvent<AppLayoutProps.ChangeDetail>Fired when the split panel is toggled.
toolsChangeCustomEvent<AppLayoutProps.ChangeDetail>Fired when the tools drawer is toggled.