Frontend Masters Blog

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

Read the original on blog.master.dev ↗

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>

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

The post A first look at native swipe menus with overscroll area in HTML appeared first on Master.dev Blog.