About this set
A documentation-style header built around a wide search field. The logo sits on the left, the search form takes the flexible middle of the bar up to 560px, and three links (Guides, API, Changelog) sit on the right, with the current page shown by an indigo tint. Use it for a docs site, a template library or a knowledge base, anywhere visitors are more likely to search than to browse. The search is a real form with role=”search”, a visually hidden label and a magnifier drawn as inline SVG. A short script moves focus to the field when someone presses the / key, unless they are already typing in a field, and the input advertises that shortcut with aria-keyshortcuts. The / hint inside the field is hidden from screen readers and from narrow screens. Below 992px the links fold behind a menu button while the search stays in the bar, and the whole header stays sticky at the top of the page.
What’s included
- Search form with role="search", a hidden label and a / keyboard shortcut
- Current page styled from aria-current="page"
- Links fold behind a menu button below 992px while the search stays visible
- Esc closes the open menu and returns focus to the button
- Bootstrap version uses .navbar-expand-lg, .form-control and the Collapse plugin
Accessibility
The links sit in a nav labelled Main and the current one has aria-current="page". The search field has a visually hidden label, and aria-keyshortcuts announces the / shortcut. The menu button is a real button with an accessible name that reports aria-expanded; it opens with Enter or Space, and Esc closes the menu and returns focus to the button. Every link, button and field shows a visible focus style, and the transitions switch off under prefers-reduced-motion.
Customise it
In plain CSS change the hex values on .hs, .hs-search and .hs-menu (#4f46e5 for focus, #eef2ff and #4338ca for the current link) and the 72px min-height. In Bootstrap the link colours are the --bs-navbar-* variables on .hs; in Tailwind edit the hex values in the hover: and aria-[current=page]: utilities.



















