Skip to content

Full-screen hamburger mobile menu

A hamburger button that morphs into a cross and opens a full-screen menu: trapped focus, Escape to close and a call button at the bottom.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

The “Menu” button keeps the same name and announces its state with aria-expanded; its three lines rotate into a cross. When it opens, focus moves to the first link, Tab and Shift+Tab cycle through the links, the call button and the cross, and the rest of the page becomes inert: screen readers included, nothing escapes the menu. Escape or the cross close the menu and return focus to the button; choosing a link closes it too. Page scrolling is locked while it is open. At the bottom, a box offers a direct call with the opening hours. Without JavaScript, the links stay displayed under the bar. Light and dark, AA contrast, and with prefers-reduced-motion the menu appears without animation.

Code

Loading the code…

The code of this component in

Archive contents

menu-mobile-hamburger-plein-ecran-html-tailwind.zip3 files · 6 Ko

  • index.html13 Ko
  • README.md3 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • A slim bar at the top of the page with a message, a link and a close button; once closed, it stays hidden for the period you choose.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A sticky sidebar table of contents for blog posts: it highlights the section being read, shows the reading time left and folds into a list under the title on mobile.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A column of dots on the side of the page that follows the section being read and lets visitors jump to it, with a label on hover and focus.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • An order step indicator: finished steps clickable to go back, the current step announced, upcoming steps locked.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component