22 Tailwind CSS Headers

21 Pure Tailwind1 Tailwind + JSPublished

22 Tailwind CSS headers for docs sites, SaaS apps, storefronts and marketing pages — spanning command palettes, workspace switchers, mega-menu and cart clusters, sticky and shrinking scroll behaviour, reading-progress bars, glassmorphism, dropdowns and announcement bars. Scoped under .thd-NN for no-collision pasting, prefers-reduced-motion guarded, framework-agnostic.

Related22 CSS Headers25 CSS Footer Designs21 Tailwind CSS Pricing Sections

Premium template pickPartner: Cruip

Affiliate link

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.

Browse Cruip templates

Cruip. We may earn a commission, at no extra cost to you.

01. Tailwind CSS Command Palette Header with ⌘K Shortcut (opens in a new tab)

Published

Tailwind + JS
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.

03. Tailwind SaaS App Header with Workspace Switcher (opens in a new tab)

Published

Pure Tailwind
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]:.

05. Tailwind Marketing Header with Sticky CTA on Scroll (opens in a new tab)

Published

Pure Tailwind
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.

06. Tailwind Article Header with Reading Progress Bar (opens in a new tab)

Published

Pure Tailwind
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.

at

Almost there: check your inbox to confirm.Manage

07. Tailwind Centered Logo Editorial Header (opens in a new tab)

Published

Pure Tailwind
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.

08. Tailwind Transparent Header Over Hero Image (opens in a new tab)

Published

Pure Tailwind
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.

09. Tailwind Header with Breadcrumb Navigation (opens in a new tab)

Published

Pure Tailwind
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.

10. Tailwind Header with Notification Dropdown and User Menu (opens in a new tab)

Published

Pure Tailwind
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.

11. Tailwind Header with GitHub Star Button (opens in a new tab)

Published

Pure Tailwind
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.

13. Tailwind Mega Menu Header with CSS Grid (opens in a new tab)

Published

Pure Tailwind
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.
Newsletter

Enjoying these demos? Get new ones by email.

A short email when a new collection ships. Unsubscribe any time.

at

Almost there: check your inbox to confirm.Manage

15. Tailwind Full Screen Menu Overlay with Hamburger Toggle (opens in a new tab)

Published

Pure Tailwind
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.

16. Tailwind Glassmorphism Header with Backdrop Blur (opens in a new tab)

Published

Pure Tailwind
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.

17. Tailwind Header with Dismissible Announcement Bar (opens in a new tab)

Published

Pure Tailwind
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.

18. Tailwind Two Row Header with Top Utility Bar (opens in a new tab)

Published

Pure Tailwind
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.

20. Tailwind Sidebar Layout with Collapsible Navigation (opens in a new tab)

Published

Pure Tailwind
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.

21. Tailwind Multi Level Dropdown Menu Header (opens in a new tab)

Published

Pure Tailwind
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.

22. Tailwind Shrinking Header on Scroll (opens in a new tab)

Published

Pure Tailwind
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.

Related collections

15 CSS Aspect Ratio Demos preview

15 CSS Aspect Ratio Demos

15 hand-coded CSS aspect-ratio demos for video embeds, product galleries, IAB ad slots, native dialogs, and CLS-safe placeholders: 16:9 iframe YouTube embed with click-to-load facade + up-next rail, 21:9 full-screen hero video with min-height/max-height:100svh guardrails + Ken Burns drift, 1:1 Instagram-style square grid with 2×2 feature tile, 4:3 magazine card image cover, 9:16 vertical stories rail (TikTok/Reels/Shorts pattern) with scroll-snap + segment bars, 4:5 apparel product image gallery with radio-driven state + 1:1 thumbnails, 1:1 zoom thumbnail carousel with pointer-tracked --zx/--zy magnifier, prevent-layout-shift placeholder with live PerformanceObserver CLS meter (before/after side-by-side lab), dynamic content fallback with three policies (bend/strict/auto) via :has() toggle, IAB ad banner slots (728×90 leaderboard, 300×250 medium rectangle, 300×600 half-page, 320×50 mobile) with skeletons + container-query mobile swap, responsive modal dialog sized min(92vw, 88svh×16/9, 1080px) with @starting-style animation, responsive OpenStreetMap iframe wrapper with 16:9 → 1:1 container-query narrow swap, media query orientation live HUD + resize:both container-ratio playground, object-fit logo cloud with contain/cover/fill switcher via :has(), and side-by-side padding-top hack (height:0 + padding-top:56.25%) → modern aspect-ratio migration comparison with live ratio picker. 11 truly Pure CSS + 4 with a tiny optional vanilla JS snippet (facade swap, pointer magnifier, CLS meter, native dialog). Every demo is scoped under a unique .car-NN prefix so it drops into any project without CSS collisions, ships prefers-reduced-motion guards, and is framework-agnostic (works as-is in React, Vue, Svelte, Astro, Next.js, Remix, or plain HTML).

6 CSS Bento Grid Layouts preview

6 CSS Bento Grid Layouts

6 production CSS bento grid layouts with 12 hand-coded designs — Apple-style product showcase, SaaS feature value-prop matrix, analytics dashboard overview, creative portfolio, e-commerce category hub, and link-in-bio social hub. Each topic ships 2 sub-variants side-by-side so visitors see both a keynote aesthetic and a paper-doc variant at once. Container queries, CSS Grid, zero dependencies, copy-paste ready.

20 CSS Blog Layouts preview

20 CSS Blog Layouts

20 hand-coded CSS blog and editorial layouts for magazine homepages, news sites, personal archives, newsletter back-issues, recipe and podcast blogs, developer tutorials, and long-form journalism. Covers a magazine homepage with hero plus editor-picks rail, a news homepage with breaking-news ticker, blog archives with sticky year separators, Substack-style issue-numbered archives, recipe card grids with prep-time badges, podcast episode lists with waveforms, long-form articles with scroll-driven reading progress, drop caps and floated pull quotes via first-letter, Medium-style 65ch centred reader layouts, dev tutorials with a sticky code panel beside prose, interview transcripts with alternating speakers, case-study pages with stat counters, video blogs with an episode rail, full-bleed photo essays, news articles with sticky related-stories sidebars, documentation pages with prev/next chapter nav, a standalone blog post card, a scroll-snap category filter bar, an inline newsletter callout that breaks out of the prose column, and a horizontal featured-post rail. 12 are pure CSS with zero JavaScript. Every layout is scoped under a .bl-NN prefix for no-collision pasting, guards prefers-reduced-motion, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.

Search CodeFronts

Loading…