SideSheet
Side sheets present modal supporting content from the side of the viewport using the native <dialog> element. Page scrolling behind the sheet is locked by default while it is open.
Anatomy
| Element | Part | Selector |
|---|---|---|
<dialog> | root | [data-scope="side-sheet"][data-part="root"]LMBCopy |
<div> | surface | [data-scope="side-sheet"][data-part="surface"]LMBCopy |
<h2> | headlineconditional | [data-scope="side-sheet"][data-part="headline"]LMBCopy |
<div> | contentconditional | [data-scope="side-sheet"][data-part="content"]LMBCopy |
<div> | actionsconditional | [data-scope="side-sheet"][data-part="actions"]LMBCopy |
Props
| Name | Description | Default | Control |
|---|---|---|---|
closeOnBackdropOptional | Whether clicking the backdrop closes the sheet. boolean | undefined | true | |
lockScrollOptional | Whether page scrolling behind the sheet is locked while open. boolean | undefined | true | |
sideOptional | Which viewport side the sheet enters from. startend | "end" | |
variantOptional | Sheet visual style. dockeddetached | "docked" | |
widthOptional | Sheet surface width. Such as '20rem'. string | undefined | undefined | |
openOptional | - boolean | undefined | false |
Events3
| Name | Type | Description |
|---|---|---|
close | [returnValue: string] | - |
update:open | [value: boolean] | - |
cancel | [event: Event] | - |
Slots3
| Name | Parameters | Description |
|---|---|---|
headline | - | Optional sheet headline. |
default | - | Sheet body content. |
actions | - | Optional action row. |
Styling23
| Token | Description |
|---|---|
--md-sheet-side-detached-container-shapeShapeFallback var(--md-shape-popover) | Controls side detached container shape. |
--md-sheet-side-docked-container-heightLayoutFallback 100% | Controls side docked container height. |
--md-sheet-side-docked-container-shapeShapeFallback var(--md-shape-docked) | Controls side docked container shape. |
--md-sheet-side-docked-container-widthLayoutFallback 16rem | Controls side docked container width. |
--md-sheet-side-docked-divider-colorColorFallback var(--md-sys-color-outline) | Controls side docked divider color. |
--md-sheet-side-docked-focus-indicator-colorFocusFallback var(--md-sys-color-secondary) | Controls side docked focus indicator color. |
--md-sheet-side-docked-focus-indicator-outline-offsetFocusFallback var(--md-sys-state-focus-indicator-outer-offset) | Controls side docked focus indicator outline offset. |
--md-sheet-side-docked-focus-indicator-thicknessFocusFallback var(--md-sys-state-focus-indicator-thickness) | Controls side docked focus indicator thickness. |
--md-sheet-side-docked-headline-colorColorFallback var(--md-sys-color-on-surface-variant) | Controls side docked headline color. |
--md-sheet-side-docked-headline-fontTypographyFallback var(--md-sys-typescale-title-large-font) | Controls side docked headline font. |
--md-sheet-side-docked-headline-line-heightTypographyFallback var(--md-sys-typescale-title-large-line-height) | Controls side docked headline line height. |
--md-sheet-side-docked-headline-sizeLayoutFallback var(--md-sys-typescale-title-large-size) | Controls side docked headline size. |
--md-sheet-side-docked-headline-trackingTypographyFallback var(--md-sys-typescale-title-large-tracking) | Controls side docked headline tracking. |
--md-sheet-side-docked-headline-typeTypographyFallback var(--md-sys-typescale-title-large) | Controls side docked headline type. |
--md-sheet-side-docked-headline-weightTypographyFallback var(--md-sys-typescale-title-large-weight) | Controls side docked headline weight. |
--md-sheet-side-docked-modal-container-colorColorFallback var(--md-sys-color-surface-container-low) | Controls side docked modal container color. |
--md-sheet-side-docked-modal-container-elevationElevationFallback var(--md-sys-elevation-level1) | Controls side docked modal container elevation. |
--md-sheet-side-docked-modal-container-shapeShapeFallback var(--md-shape-docked-modal) | Controls side docked modal container shape. |
--md-sheet-side-docked-standard-container-colorColorFallback var(--md-sys-color-surface) | Controls side docked standard container color. |
--md-sheet-side-docked-standard-container-elevationElevationFallback var(--md-sys-elevation-level0) | Controls side docked standard container elevation. |
--md-side-sheet-closed-translateStyleFallback 100% | Controls closed translate. |
--md-side-sheet-detached-gapLayoutFallback 1rem | Controls detached gap. |
--md-side-sheet-widthLayoutFallback var(--md-sheet-side-docked-container-width,16rem) | Controls width. |
Layout
The sheet surface owns the background, shape, elevation, and motion. Default spacing is applied to the headline, content, and actions parts instead of the surface, so custom full-bleed content can opt out by overriding the relevant part padding.