Skip to content
motionprompts motionprompts

Band Aware Header

GSAP animation component · Published 2026-11-21 · by vanguardia.dev

Open live demo ↗ Download source

What it does

A fixed header with a blurred translucent veil that reads which section is under its midline (each section declares data-tema dark or light) and switches its skin on every scroll, with a 0.45s CSS transition of veil, ink and button colours. Nav links grow an underline from the left on hover and the pill button slides a fresh arrow into its circle.

How it's built

Categorymenu
Techgsap
Complexitywidget
Performance costlight
Mobile-safeyes

header navbar sticky backdrop-blur theme-switch scroll hover underline pill-button

Rebuild it with AI

This component's prompt is part of the paid library. Below you can read how it starts; the full prompt, the exact structure, timing and easing an AI agent needs to rebuild the effect, unlocks with any paid plan, yearly or lifetime.

# Band Aware Header — a fixed blurred bar that switches skin with the section underneath
## Goal
Build a fixed top bar (75px tall) with a translucent, blurred veil behind it. Every section of the page declares its tone with `data-tema="oscura"` (dark) or `data-tema="clara"` (light). On every scroll the bar looks at its own horizontal midline, finds the section crossing it and copies that section's tone into its own `data-piel` attribute; CSS then cross-fades the veil, the ink and the button colours in 0.45s. Inside the bar: a text wordmark on the left, four nav links whose 1px underline grows from the left on hover (and the current page keeps it, plus a small accent dot), and a pill button on the right whose inner circle slides a fresh arrow in on hover and turns accent. On load the bar drops in from above. The demo is just four flat full-height bands alternating black and white, each with one huge headline that passes behind the veil so the blur reads.
## Tech
Vanilla HTML/CSS/JS with an ES module import of `gsap` (npm), used only for the entrance. No ScrollTrigger, no Lenis: a passive native `scroll` listener plus `getBoundingClientRect()` (it also works unchanged under Lenis, which scrolls the window natively).
Fonts, self-hosted (no CDN): **Bricolage Grotesque** (variable, wordmark and band headlines) and **Instrument Sans** (400–700, links and button).
## Layout / HTML
```html
<header class="bah" data-piel="oscura">
  <div class="bah__barra">                         <!-- 12-col grid, align-items:center -->
    <a class="bah__marca" href="#">Studio</a>     <!-- cols 1–3 -->
    <nav class="bah__nav" aria-label="Main">  <!-- cols 5–10 -->
…

Premium prompt

Unlock this prompt, and every other one

From $99/year, or $139 once for lifetime access. Commercial license included.

See pricing Or start with the free set Already bought? Sign in

New components in your inbox

One email a week, only when new components ship, each with its live demo and prompt.