About this set
A mobile-style header with a logo and a three-bar hamburger button. Pressing it turns the bars into a close mark, slides a 290 pixel drawer in from the right under the header and dims the page with a scrim. The drawer lists Home, Products, Pricing and Customers, then Docs and Support after a thin rule, with a full-width indigo Start free trial button pinned to the bottom. Use it as the main navigation on small screens, or at every width for a minimal site. The button is a disclosure with aria-expanded and aria-controls, so screen readers hear Menu, collapsed or expanded, and the close mark is drawn from that same attribute. Esc or a tap on the scrim closes the drawer and returns focus to the button, tabbing out of the drawer closes it, and the hidden drawer is removed from the tab order. The drawer is capped at 82 percent of the viewport width so a strip of the page always shows. The Bootstrap version uses .navbar with an .offcanvas-end drawer, whose plugin also traps focus while it is open, and the Tailwind version uses group-data utilities.
What’s included
- Hamburger bars that turn into a close mark
- Drawer slides in under the header with a scrim
- Esc, the scrim or the button closes it
- Hidden drawer links stay out of the tab order
- Drawer capped at 82% of the screen width
Accessibility
The Menu button reports its state with aria-expanded and controls the drawer, which is a nav labelled Main with the current page marked by aria-current. Esc or the scrim closes the drawer and focus returns to the button; in Bootstrap the offcanvas also keeps focus inside while open. Links and the button show a 2px indigo outline on keyboard focus, and the slide, fade and bar animations are removed under prefers-reduced-motion.
Customise it
Change the drawer width, colours and scrim in .hb-drawer and .hb-scrim (plain CSS), the --bs-offcanvas-* variables, .offcanvas-backdrop and --bs-nav-link-* values (Bootstrap) or the --color-hb-* theme colours and w-[290px] (Tailwind).



















