A first look at native swipe menus with overscroll area in HTML

Brecht De Ruyte show off how we’re getting swipe-from-an-edge content with just HTML/CSS by virtue of attributes:

<body overscrollcontainer>
  <aside id="menu" overscrollarea>
    <!-- menu stuff -->
    <button command="hide-overscroll" commandfor="menu">
      (Required!) Close Button
    </button>
  </aside>

  <header class="site-nav">
    <button command="toggle-overscroll" commandfor="menu">
      (Required!) Toggle Menu
    </button>
  </header>

  <main> ... </main>
</body>
Code language: HTML, XML (xml)

There is a lot to know, though, so check out Brecht’s article for the meat.

Leave a Reply

Your email address will not be published. Required fields are marked *

$966,000

Master.dev donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.