Skip to content
IndexRequest a UIAboutContact

Bottom Sheet

A panel anchored to the bottom that can be dragged between collapsed, half and full heights.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Create a 280x260px phone-like area with placeholder map content behind a bottom sheet. The sheet is absolutely positioned at the bottom with border radius 16px on top, white background, 1px border, and a centered handle button (40x4px bar inside a 44px tall hit area, touch-action none, aria-label "Resize sheet") above a title "Nearby" and three list rows. Define snap heights of 64px, 50% and 90% of the container. Pointer events on the handle change the sheet height by the drag delta (clamped between 64px and 90%) with transitions disabled while dragging; on release, snap to the nearest snap height with a 300ms cubic-bezier(.2,.7,.2,1) height transition. Pressing Enter or Space on the handle moves to the next snap height, looping back to the first. Expose the current state in aria-valuetext through role "slider" semantics or in a polite live region. Under prefers-reduced-motion snap without transition.

About this pattern

Definition

A surface docked to the bottom of the screen. Dragging its handle changes its height, and on release it snaps to the nearest of several preset heights.

Purpose & UX principles

  • Shows supporting content (maps, filters, playlists) while keeping the main view visible.
  • Snap points make the result predictable; the handle is the only draggable area so inner content can still scroll.
  • The handle is also a button: Enter cycles through the snap heights for people who cannot drag.

Interaction states

  • Collapsed, half, full, dragging (no transition), focus-visible on the handle.

Motion specification

  • Release snaps with a 300ms cubic-bezier(.2,.7,.2,1) height transition.
  • Dragging tracks the pointer without delay.
  • Reduced motion: snaps instantly.

Responsive behaviour

  • Snap heights are relative to the container: collapsed 64px, half 50%, full 90%.
  • On wide screens the sheet can become a fixed-width panel.

Code

HTML
<div class="phone" id="phone">
  <div class="map" aria-hidden="true"></div>
  <section class="sheet" id="sheet" aria-label="Nearby places">
    <button class="grab" id="grab" aria-label="Resize sheet"><i></i></button>
    <h3>Nearby</h3>
    <ul><li>Cafe Meridian<small>120 m</small></li><li>North Library<small>340 m</small></li><li>Green Market<small>600 m</small></li></ul>
  </section>
</div>

Related patterns

Drawer

↗
DrawerOverlays & Dialogs

Modal Dialog

↗
Modal DialogOverlays & Dialogs

Long Press Menu

↗
Long Press MenuGestures & Touch