Search
MaterialComponentsDocs
Components overviewApp barBadgeButtonsButton groupButtonExtended FABFAB menuFABIcon buttonSplit buttonCardCarouselCheckboxChipsDate & time pickersDate pickerTime pickerDialogDividerListLoading & progressLoading indicatorProgressMenuNavigationNavigation barNavigation drawerNavigation railRadio buttonsSearchSelectSheetsBottom sheetSide sheetSliderSnackbarSwitchTabsText fieldToolbarTooltip

Bottom sheet

Reveal more from the bottom edge. Try partial and expanded states, or drag the handle.

Show bottom sheet

Find a new trail, take in the view, and make time for a quiet moment.

FactoryWeb ComponentsReactVueSvelteSolidJS
PublishedUpdated

A bottom sheet holds secondary content anchored to the bottom of the screen: sharing options, filters, the details of a place on a map. A modal sheet covers the page with a scrim until it closes; a standard sheet leaves the page usable beside it.

Usage

An open sheet is partially expanded, showing its content up to half the screen; dragging its handle up expands it to its full height, and down closes it.

Vanilla
import { createBottomSheet } from 'material';

const sheet = createBottomSheet({
  variant: 'modal',
  title: 'Share',
  content: 'Anyone with the link can view it.',
});
document.body.append(sheet.element);

function share() {
  sheet.open();
}
Web Components
<m-bottom-sheet modal headline="Share">
  <p>Anyone with the link can view it.</p>
</m-bottom-sheet>

<script type="module">
  const bottomSheet = document.querySelector('m-bottom-sheet');

  function share() {
    bottomSheet.expand();
  }
</script>
React
import { useState } from 'react';
import { BottomSheet } from 'material/react';

export function Example() {
  const [open, setOpen] = useState(false);
  const share = () => setOpen(true);

  return (
    <BottomSheet open={open} onClose={() => setOpen(false)} modal headline="Share">
      <p>Anyone with the link can view it.</p>
    </BottomSheet>
  );
}
Vue
<script setup lang="ts">
import { ref } from 'vue';
import { MBottomSheet } from 'material/vue';

const open = ref(false);

function share() {
  open.value = true;
}
</script>

<template>
  <MBottomSheet :open="open" @close="open = false" modal headline="Share">
    <p>Anyone with the link can view it.</p>
  </MBottomSheet>
</template>
Svelte
<script lang="ts">
  import { BottomSheet } from 'material/svelte';

  let open = $state(false);

  function share() {
    open = true;
  }
</script>

<BottomSheet open={open} onclose={() => (open = false)} modal headline="Share">
  <p>Anyone with the link can view it.</p>
</BottomSheet>
SolidJS
import { createSignal } from 'solid-js';
import { BottomSheet } from 'material/solid';

export function Example() {
  const [open, setOpen] = createSignal(false);
  const share = () => setOpen(true);

  return (
    <BottomSheet open={open()} onClose={() => setOpen(false)} modal headline="Share">
      <p>Anyone with the link can view it.</p>
    </BottomSheet>
  );
}

Examples

Standard

A standard sheet has no scrim, so the page behind it still takes clicks.

Vanilla
import { createBottomSheet } from 'material';

const sheet = createBottomSheet({
  variant: 'standard',
  title: 'Nearby places',
  content: 'Three cafés within a five-minute walk.',
});
document.body.append(sheet.element);
Web Components
<m-bottom-sheet headline="Nearby places">
  <p>Three cafés within a five-minute walk.</p>
</m-bottom-sheet>
React
import { BottomSheet } from 'material/react';

export function Example() {
  return (
    <BottomSheet headline="Nearby places">
      <p>Three cafés within a five-minute walk.</p>
    </BottomSheet>
  );
}
Vue
<script setup lang="ts">
import { MBottomSheet } from 'material/vue';
</script>

<template>
  <MBottomSheet headline="Nearby places">
    <p>Three cafés within a five-minute walk.</p>
  </MBottomSheet>
</template>
Svelte
<script lang="ts">
  import { BottomSheet } from 'material/svelte';
</script>

<BottomSheet headline="Nearby places">
  <p>Three cafés within a five-minute walk.</p>
</BottomSheet>
SolidJS
import { BottomSheet } from 'material/solid';

export function Example() {
  return (
    <BottomSheet headline="Nearby places">
      <p>Three cafés within a five-minute walk.</p>
    </BottomSheet>
  );
}

Peek height

peekHeight sets the partially expanded height in pixels; expand() and collapse() move between the two heights.

Vanilla
import { createBottomSheet } from 'material';

const sheet = createBottomSheet({
  variant: 'modal',
  title: 'Filters',
  peekHeight: 160,
  content: 'Price, distance and opening hours.',
});
document.body.append(sheet.element);
Web Components
<m-bottom-sheet peek-height="160" modal headline="Filters">
  <p>Price, distance and opening hours.</p>
</m-bottom-sheet>
React
import { BottomSheet } from 'material/react';

export function Example() {
  return (
    <BottomSheet peekHeight={160} modal headline="Filters">
      <p>Price, distance and opening hours.</p>
    </BottomSheet>
  );
}
Vue
<script setup lang="ts">
import { MBottomSheet } from 'material/vue';
</script>

<template>
  <MBottomSheet :peek-height="160" modal headline="Filters">
    <p>Price, distance and opening hours.</p>
  </MBottomSheet>
</template>
Svelte
<script lang="ts">
  import { BottomSheet } from 'material/svelte';
</script>

<BottomSheet peekHeight={160} modal headline="Filters">
  <p>Price, distance and opening hours.</p>
</BottomSheet>
SolidJS
import { BottomSheet } from 'material/solid';

export function Example() {
  return (
    <BottomSheet peekHeight={160} modal headline="Filters">
      <p>Price, distance and opening hours.</p>
    </BottomSheet>
  );
}

Only its content closes it

For a step that must be finished, the scrim, Escape and the drag handle can be kept from closing it.

Vanilla
import { createBottomSheet } from 'material';

const sheet = createBottomSheet({
  variant: 'modal',
  title: 'Before you continue',
  content: 'Review the updated terms.',
  dragHandle: false,
  closeOnScrimClick: false,
  closeOnEscape: false,
});
document.body.append(sheet.element);
Web Components
<m-bottom-sheet modal headline="Before you continue" no-drag-handle no-close-on-scrim-click no-close-on-escape>
  <p>Review the updated terms.</p>
</m-bottom-sheet>
React
import { BottomSheet } from 'material/react';

export function Example() {
  return (
    <BottomSheet modal headline="Before you continue" noDragHandle noCloseOnScrimClick noCloseOnEscape>
      <p>Review the updated terms.</p>
    </BottomSheet>
  );
}
Vue
<script setup lang="ts">
import { MBottomSheet } from 'material/vue';
</script>

<template>
  <MBottomSheet modal headline="Before you continue" no-drag-handle no-close-on-scrim-click no-close-on-escape>
    <p>Review the updated terms.</p>
  </MBottomSheet>
</template>
Svelte
<script lang="ts">
  import { BottomSheet } from 'material/svelte';
</script>

<BottomSheet modal headline="Before you continue" noDragHandle noCloseOnScrimClick noCloseOnEscape>
  <p>Review the updated terms.</p>
</BottomSheet>
SolidJS
import { BottomSheet } from 'material/solid';

export function Example() {
  return (
    <BottomSheet modal headline="Before you continue" noDragHandle noCloseOnScrimClick noCloseOnEscape>
      <p>Review the updated terms.</p>
    </BottomSheet>
  );
}

API

Options

variant

Whether it covers the page; the web component is standard without modal

Type'standard' | 'modal'
Default'modal'
title

The headline, which names the sheet

Typestring
Defaultundefined
content

The body, as HTML or an element

Typestring | HTMLElement
Defaultundefined
dragHandle

The handle, a button, and dragging with it

Typeboolean
Defaulttrue
peekHeight

The partially expanded height in pixels; without it, the content up to half the screen

Typenumber
Defaultundefined
maxWidth

The widest it grows, in pixels, past which it is centered

Typenumber
Default640
initialState

How far open it starts

Type'hidden' | 'partial' | 'expanded'
Default'hidden'
closeOnScrimClick

Whether a click on the scrim closes a modal sheet

Typeboolean
Defaulttrue
closeOnEscape

Whether Escape closes it; a standard sheet only from inside it

Typeboolean
Defaulttrue
layer

Shows a modal sheet in the top layer, as a native <dialog> with showModal(); the web component's modal sheet always is

Type'top'
Defaultundefined
container

Where it is mounted

TypeHTMLElement
Defaultdocument.body
on

Event handlers registered at creation

Type{ open?, close?, stateChange?, dragStart?, dragEnd? }
Defaultundefined
class

Additional CSS classes

Typestring
Defaultundefined

Methods

open() / close()

Opens it partially expanded, or closes it

Parametersnone
ReturnsBottomSheetComponent
expand() / collapse()

Moves it to its full or its partial height, opening it if it is closed

Parametersnone
ReturnsBottomSheetComponent
isOpen()

Whether it is open at either height

Parametersnone
Returnsboolean
getState()

How far open it is

Parametersnone
Returns'hidden' | 'partial' | 'expanded'
setTitle(title) / setContent(content)

The headline, the body

Parameterstitle: string, content: string | HTMLElement
ReturnsBottomSheetComponent
on(event, handler) / off(event, handler)

Adds or removes a listener

Parametersevent: string, handler: Function
ReturnsBottomSheetComponent
destroy()

Removes it

Parametersnone
Returnsvoid

Events

open / close

It opened or closed

Payloadnone
stateChange

It moved between hidden, partial and expanded

Payload{ state, previous }
dragStart / dragEnd

A drag on the handle began, or ended and settled

Payloadnone / { state, previous }

The web component dispatches open, close, expand and collapse, without a detail; its expanded attribute reflects the full height.

Styling

.mtrl-bottom-sheet { }                     /* the fixed layer, holding the scrim and the sheet */
.mtrl-bottom-sheet--modal, .mtrl-bottom-sheet--standard { }
.mtrl-bottom-sheet--hidden, .mtrl-bottom-sheet--partial, .mtrl-bottom-sheet--expanded { }
.mtrl-bottom-sheet__scrim { }              /* a modal sheet's, outside the top layer */
.mtrl-bottom-sheet__container { }          /* the sheet */
.mtrl-bottom-sheet__handle, .mtrl-bottom-sheet__header, .mtrl-bottom-sheet__title { }
.mtrl-bottom-sheet__content { }

Measurements

Attribute Value
Container surface-container-low, 28dp top corners, elevation 1
Maximum width 640dp
Drag handle A 48dp button drawing a 32×4dp bar in on-surface-variant; focus ring secondary
Headline Headline Small, on-surface
Content Body Medium, on-surface-variant, 24dp at the sides
Scrim scrim at 32%
Settling a drag 56dp, or a flick of 125dp/s