BottomSheet
Bottom sheets present modal content from the bottom edge of the viewport using the native <dialog> element. Page scrolling behind the sheet is locked while it is open.
Anatomy
| Element | Part | Selector |
|---|---|---|
<dialog> | root | [data-scope="bottom-sheet"][data-part="root"]LMBCopy |
<div> | surface | [data-scope="bottom-sheet"][data-part="surface"]LMBCopy |
<div> | drag-handleconditional | [data-scope="bottom-sheet"][data-part="drag-handle"]LMBCopy |
<h2> | headlineconditional | [data-scope="bottom-sheet"][data-part="headline"]LMBCopy |
<div> | contentconditional | [data-scope="bottom-sheet"][data-part="content"]LMBCopy |
<div> | actionsconditional | [data-scope="bottom-sheet"][data-part="actions"]LMBCopy |
Props
| Name | Description | Default | Control |
|---|---|---|---|
closeOnBackdropOptional | Whether clicking the backdrop closes the sheet. boolean | undefined | true | |
showDragHandleOptional | Whether to show the Material drag handle. boolean | undefined | true | |
maxHeightOptional | Maximum block size of the sheet surface. Such as '80vh'. 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. |
Styling15
| Token | Description |
|---|---|
--md-bottom-sheet-background-extensionStyleFallback 0px | Controls background extension. |
--md-bottom-sheet-drag-offsetLayoutFallback 0px | Controls drag offset. |
--md-bottom-sheet-max-heightLayoutFallback calc(100vb - 3rem) | Controls max height. |
--md-bottom-sheet-translate-offsetLayoutFallback 0px | Controls translate offset. |
--md-sheet-bottom-docked-container-colorColorFallback var(--md-sys-color-surface-container-low) | Controls bottom docked container color. |
--md-sheet-bottom-docked-container-shapeShapeFallback var(--md-shape-overlay-top) | Controls bottom docked container shape. |
--md-sheet-bottom-docked-drag-handle-colorColorFallback var(--md-sys-color-on-surface-variant) | Controls bottom docked drag handle color. |
--md-sheet-bottom-docked-drag-handle-heightLayoutFallback 0.25rem | Controls bottom docked drag handle height. |
--md-sheet-bottom-docked-drag-handle-widthLayoutFallback 2rem | Controls bottom docked drag handle width. |
--md-sheet-bottom-docked-minimized-container-shapeShapeFallback var(--md-shape-docked) | Controls bottom docked minimized container shape. |
--md-sheet-bottom-docked-modal-container-elevationElevationFallback var(--md-sys-elevation-level1) | Controls bottom docked modal container elevation. |
--md-sheet-bottom-docked-standard-container-elevationElevationFallback var(--md-sys-elevation-level1) | Controls bottom docked standard container elevation. |
--md-sheet-bottom-focus-indicator-colorFocusFallback var(--md-sys-color-secondary) | Controls bottom focus indicator color. |
--md-sheet-bottom-focus-indicator-outline-offsetFocusFallback var(--md-sys-state-focus-indicator-outer-offset) | Controls bottom focus indicator outline offset. |
--md-sheet-bottom-focus-indicator-thicknessFocusFallback var(--md-sys-state-focus-indicator-thickness) | Controls bottom focus indicator thickness. |
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.
Scrollable content also preserves common descendant visual overflow at its block edges. See Scrollable Content Visual Overflow for the shared surface contract and its customization token.