CSS Bottom Sheet Menu

A mobile menu that slides up from the bottom of the screen as a sheet with a dimmed backdrop.

  • mobile menu
  • sheet
  • details
  • backdrop
  • thumb friendly
HTML
<details class="sheet-menu">
  <summary>Menu</summary>
  <nav aria-label="Main">
    <a href="#">Home</a>
    <a href="#">Orders</a>
    <a href="#">Saved</a>
    <a href="#">Account</a>
  </nav>
</details>
CSS
.sheet-menu summary {
  position: relative;
  z-index: 11;
  padding: 10px 20px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font: 600 14px system-ui, sans-serif;
  list-style: none;
  cursor: pointer;
}

.sheet-menu summary::-webkit-details-marker {
  display: none;
}

.sheet-menu summary:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

/* The huge spread shadow doubles as the backdrop */
.sheet-menu nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: grid;
  gap: 2px;
  padding: 28px 16px 20px;
  border-radius: 20px 20px 0 0;
  background: #ffffff;
  box-shadow: 0 0 0 100vmax #0f172a66;
  animation: sheet-menu-up 0.35s cubic-bezier(0.3, 0.7, 0.4, 1);
}

/* Grab handle */
.sheet-menu nav::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 40px;
  height: 4px;
  margin-left: -20px;
  border-radius: 4px;
  background: #cbd5e1;
}

.sheet-menu nav a {
  padding: 12px 14px;
  border-radius: 10px;
  color: #0f172a;
  font: 500 16px system-ui, sans-serif;
  text-decoration: none;
}

.sheet-menu nav a:hover {
  background: #f1f5f9;
}

.sheet-menu nav a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

@keyframes sheet-menu-up {
  from { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .sheet-menu nav { animation: none; }
}

About this CSS Bottom Sheet Menu

This CSS Bottom Sheet Menu is 74 lines of pure CSS (1.4 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms, box shadows and CSS Grid. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.

CSS features used

Customize it

The colors in this snippet. Search and replace them to match your brand:

  • #0f172a
  • #ffffff
  • #2563eb
  • #0f172a66
  • #cbd5e1
  • #f1f5f9

How to use this bottom sheet menu

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .sheet-menu class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).

Building with an AI tool?

“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.

Feedback