Building the whole landing page, not just this section?
You just browsed 22 Tailwind header designs. Cruip makes complete Tailwind CSS templates for landing pages, SaaS websites and admin dashboards, coded in HTML, React, Next.js and Vue and used by 60K+ developers. Single templates start at $49.
The developer-tool header of 2026: a muted search pill in the centre of the bar with a <kbd>⌘K</kbd> badge, opening a full command palette that scales and fades in. Open/close is pure CSS state read with group-has-[#thd-01-open:checked]/thd01:; the small script adds the global shortcut, live filtering and arrow-key navigation the CSS original never had.
The three controls docs readers hunt for — a version switcher with channel chips, a search field with its <kbd>/</kbd> hint, and a Docs / API / Blog / GitHub row — above a sticky sidebar. The version menu opens on group-hover/ver:andgroup-focus-within/ver:, so it is keyboard-operable with zero script.
The chrome that wraps a multi-tenant product: a workspace picker showing the tenant's avatar, plan and seats; section nav; a toolbar of search, help and notifications; and an account menu. Both menus open on group-hover and group-focus-within, and the active workspace is marked with aria-[current=true]:.
A storefront header with the utility cluster shoppers reach for — account, a wishlist heart with its count and a cart pill with a running total — plus a Shop mega panel of categories, three featured products and a members promo. Counts use tabular-nums so nothing shifts as the basket changes.
A landing-page header that stays quiet until it has earned the ask: logo, nav and a text link at rest, then a solid Start free trial button slides in once the reader passes 240 px. It is a custom @utility on a scroll(root) timeline — no scroll listener — and where scroll-driven animation is unsupported the button is simply visible from the start.
An editorial header with a hairline meter that fills as the reader moves down the piece — one element scaled with scaleX() on a scroll(root) timeline, a single composited layer instead of a scroll handler. New in this port: the article's title docks into the header once the hero scrolls away, on the same timeline.
Newsletter
Enjoying these demos? Get new ones by email.
A short email when a new collection ships. Unsubscribe any time.
A masthead in the newspaper tradition: dateline and issue on the left, a serif wordmark dead centre, subscribe and account on the right, and a section row under a double rule. The centring is structural — grid-cols-[1fr_auto_1fr] — so the wordmark stays exactly centred however long either side gets.
The landing-page classic without a scroll listener: the header floats transparent over a full-bleed hero, then solidifies into an opaque bar with dark ink as the reader passes 60 px. A gradient scrim and v4.1's text-shadow-* utilities keep nav text readable over the image, and the fallback is the solid bar — never white text on a white page.
A two-tier header for deep pages: brand, section nav and utilities on top; a breadcrumb trail below with page actions aligned right. The trail is a real <nav aria-label="Breadcrumb"> around an <ol>, separators come from not-first:before:content-['/'] so they are never read aloud, and the middle crumbs collapse to an ellipsis on phones.
The right-hand utility cluster taken seriously: a bell with an unread pill that pulses on arrival, a notifications panel grouped into Today and Earlier, and an avatar menu with profile, preferences and sign out. Both panels open on group-hover and group-focus-within — the whole cluster is keyboard-operable with zero script.
The header every open-source project ships: wordmark with a version chip, a short docs nav, and a two-part star button linking to the repository. Monochrome with a hard offset shadow — shadow-[4px_4px_0_var(--color-thd11-ink)] — that presses flat on click, and a count in tabular figures so it never nudges the layout.
The reference sticky header, rebuilt in utilities: sticky top-0, fully transparent at the top, gaining its surface, blur and a glowing gradient rim as the reader passes the first 80 px. No listeners, no position: fixed, no layout shift — and browsers without scroll timelines get the finished bar from the first pixel.
A mega panel that is a genuine CSS Grid — a capabilities column with icons, a 2×2 grid of use-case cards and a promo rail — opened by group-hover/mega or group-focus-within/mega. Closed, the panel is invisible, so its links leave the tab order instead of swallowing keyboard focus.
Logo left, nav truly centred, actions right — and it stays centred when the logo and button are wildly different widths. The trick is flex-1 basis-0 on both outer columns so they split leftover space equally, rather than trusting justify-between. A Show tracks switch outlines the three columns so you can see it work.
Newsletter
Enjoying these demos? Get new ones by email.
A short email when a new collection ships. Unsubscribe any time.
A header that opens into a full-screen navigation overlay with no JavaScript: a visually hidden checkbox, a label drawn as the hamburger, and group-has-[#thd-15-menu:checked] on every element that changes. The bars morph into an X on a spring curve, the overlay expands as a circle from the button with clip-path, and items stagger in from one token.
A full header surface in glass: backdrop-blur-xl backdrop-saturate-180 over a slowly drifting aurora, with an inner highlight along the top edge — shadow-[inset_0_1px_0_…] — that sells the material. The opaque fallback is the default class; supports-[backdrop-filter:blur(1px)]: only thins it when blur is real, so text always meets contrast.
A promo bar above the header that collapses to nothing when dismissed — no script, no display:none jump. The close button is a label for a hidden checkbox and the bar animates grid-rows-[1fr] → grid-rows-[0fr], the modern way to transition to intrinsic zero height. New: a small Offer chip appears in the header after dismissal, so the promotion is recoverable.
The double-decker enterprise header: a dense utility strip for support, docs, status, region, currency and language, then the primary bar with logo, main nav, search and the demo CTA. Zero radius, sharp hairlines, ultra-compact spacing — the vocabulary banks, healthcare portals and B2B platforms use. Three pure-CSS switchers, and only the primary bar sticks.
Five nav-link hover treatments in one header, side by side, so you compare them in context: a scale-x underline, a clip-up fill, a gradient sweep, a dual-layer label swap and a bracket reveal. Every one runs on transform and opacity only, and every one fires on focus-visible as well as hover.
When the header is vertical: a sidebar with logo, grouped navigation and a user footer, and a slim top bar for breadcrumb and page actions. The shell is one CSS Grid whose first track animates from 16rem to 4.5rem on a pure-CSS toggle; collapsed icons get hover tooltips, and both regions scroll independently.
Three levels of nested navigation opened by hover and by focus-within, each level flying out beside its parent row. Every level is a real role="menu" with aria-haspopup triggers, the right-most menu flies left so it never leaves the viewport, and the whole tree is walkable with Tab alone. Ink-and-sand minimal luxury, no shadows.
The header condenses as you read: 5 rem tall at rest, 3.5 rem once you pass 200 px, with the wordmark scaling down, the tagline fading and the shadow deepening on the same timeline. Custom utilities on scroll(root) — no scroll handler, no requestAnimationFrame — and without support the header simply stays compact.
FAQ
Frequently asked questions
How do I make a Tailwind header stick to the top and shrink as I scroll?
Two demos cover this. The sticky base is one utility — sticky top-0 z-50 on the header, which keeps it in normal flow until it reaches the top of the viewport, then pins it with no scroll listener and no fixed positioning that needs a spacer element. The shrinking header (demo 22) goes further with a scroll-driven animation: an @keyframes that interpolates the header height from 5rem to 3.5rem, driven by animation-timeline: scroll() so the browser ties progress to scroll position on the compositor thread instead of a JS handler. The scroll-driven sticky header (demo 12) uses the same timeline to fade a background and blur in once you leave the top. The most common trap is forgetting z-50: the header stays sticky but a later section with its own stacking context slides over it. Give the header a z-index above every page section.
How do I build a full-screen mobile menu overlay with no JavaScript?
Demo 15 does it with the checkbox hack. A visually hidden <input type="checkbox"> sits before the overlay, and the hamburger is a <label> whose for points at that checkbox, so tapping the label toggles :checked. The overlay is a following sibling styled with peer-checked: variants — hidden and opacity-0 at rest, full-screen and visible when checked. Because it is a real form control, Space and Enter toggle it and it is reachable by Tab out of the box. The accessibility gap to close yourself: the label needs an aria-label such as "Open menu", and ideally the state should surface as aria-expanded, which pure CSS cannot update — if that matters, add a few lines of script. There is also no focus management, so when the overlay closes focus stays where it was; on a large menu that is worth a small script to return focus to the trigger.
Why are the links in my transparent header unreadable over the hero image?
This is the number-one bug with the transparent-over-hero pattern in demo 8. The header floats with no background, so the link colour is fixed at author time — usually white — but a hero image is not uniformly dark. Over a bright sky or a pale product shot the white nav simply disappears. The demo leans on two fixes. Add a subtle top-down scrim behind the header, a bg-gradient-to-b from-black/40 to-transparent layer, so text always has something dark under it regardless of the photo. And keep the logo and links at a weight that survives a busy background. Do not rely on mix-blend-mode alone — it inverts unpredictably over mid-tones. If your hero can be any image a CMS supplies, the scrim is not optional. Test the focus ring too: a white focus-visible outline vanishes over light areas exactly like the text does, so give it a contrasting colour.
How do I center the nav links with a logo on the left and a button on the right?
Demo 14 is built for exactly this, and for the bug it usually hides. The naive approach — justify-between on a flex row of three items — only centres the middle group when the logo and the button happen to be the same width. The moment they differ, the centre drifts off. The fix is a three-column layout where the outer two columns are equal and flexible: give the logo wrapper and the actions wrapper flex-1, put justify-start on the first and justify-end on the last, and let the nav sit in the middle at its natural width. The two flex-1 columns now absorb all leftover space symmetrically, so the nav is truly centred on the bar rather than on the remaining gap. On narrow widths you collapse the centre nav and fold to a two-item row. Avoid absolute-position centring for the nav — it overlaps the logo once the viewport shrinks.
How do I make a mega menu that opens on keyboard focus, not just hover?
Demos 13 and 21 open their panels on hover and on focus-within, and that pairing is the whole accessibility story. Hover alone strands keyboard and touch users: the panel opens under the pointer but never for Tab. Adding :focus-within — in Tailwind, focus-within:opacity-100 focus-within:visible on the menu wrapper — means the panel also opens the instant focus lands on the trigger or any link inside it, so a keyboard user tabs straight through. Keep the trigger a real <button> or link so it is focusable at all. The multi-level demo (21) nests the same rule at each depth, flying each submenu out beside its parent. A subtle bug: a hover-intent delay set with transition-delay on the opening direction can swallow focus opening — apply the delay only to closing. On touch, hover-open causes a double-tap, so if that audience matters, gate the panel behind an explicit click toggle instead.
Why is backdrop-blur doing nothing on my glassmorphism header?
Demo 16 is a full glass header — backdrop-blur-xl backdrop-saturate-180 over a drifting gradient. If your blur does nothing, the usual cause is an opaque background: backdrop-filter blurs whatever sits behind the element, so the element's own background must be semi-transparent. A solid bg-white paints over everything the blur would reveal — use bg-white/70 or a low-alpha tint so content behind the header shows through and blurs. The second cause is that nothing is actually passing under the header: the effect only appears when the header is sticky or fixed and content scrolls beneath it. Support is broad, but older Firefox gated it behind a flag, so ship a readable bg-white/80 fallback that looks fine with no blur at all. Heavy blur over large areas is also GPU-expensive; keep the blurred surface to the header strip rather than the whole page.
How do I build a dismissible announcement bar that animates closed without display:none?
Demo 17 collapses a promo bar to nothing with no script and deliberately without display:none. The trick is a grid-rows transition: the bar's wrapper is grid with grid-rows-[1fr] when open and grid-rows-[0fr] when dismissed, while the inner content carries overflow-hidden min-h-0. Animating that fraction unit smoothly collapses the height to zero — something display:none can never do because it is not an interpolatable value, it just snaps. State is held by the checkbox hack: a hidden checkbox and a close <label>, wired with peer-checked:grid-rows-[0fr]. The real catch is persistence — pure CSS forgets the dismissal on reload, so the bar reappears every visit. If it must stay closed, record the choice in localStorage with a little script. Give the close control an aria-label too; an icon-only <label> announces nothing to a screen reader otherwise.
When should I not use a sticky, transparent, or scroll-driven header?
Several of these patterns are wrong for some sites. A sticky or shrinking header (demos 12 and 22) eats vertical space on short viewports — a phone in landscape can lose a quarter of its screen to a pinned bar, so consider hiding on scroll-down and revealing on scroll-up rather than always pinning. The transparent-over-hero header (8) only works when there is a hero to sit over; on an interior page with a white top it becomes invisible, so it must switch to a solid scrolled state. The reading-progress bar (6) belongs on long articles, not on a dashboard or checkout where there is no linear progress to report — there it is just noise. The full-screen overlay (15) is heavy for a three-link marketing site, where a plain dropdown feels calmer. And animation-timeline: scroll() is unsupported in older browsers, so any scroll-driven effect must degrade to a plain static header — never to a broken one.