Skip to content
Added 17 Aug 2026
Back to library
ocean-condensing-header-14623
Ocean Condensing Header
Scroll & Sticky

Ocean Condensing Header

Masthead that gives back two thirds of its height as the page moves under it — logo, wordmark and nav each shedding at their own rate rather than scaling as a block.

Scroll & Stickyscrollstickyheadercondenseshrinkocean
lines of CSS
71lines of CSS
dependencies
0dependencies
baseline browsers
Newlybaseline browsers
motion only on interaction
Hovermotion only on interaction
Backdrop
Hoverlab
Open a live copy in

Vue, Svelte, styled-components and Tailwind exports are part of Pro. HTML, CSS and React are free forever.

ocean-condensing-header-14623.css
.fx-v10-scroll-condense-ocean-14622 {
  position: relative;
  width: 244px;
  height: 158px;
  overflow: hidden;
  border-radius: 0.6rem;
  background: #0b1120;
  border: 1px solid #1e293b;
}
.fx-v10-scroll-condense-ocean-14622 .hd {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 58px;
  padding: 0 0.75rem;
  background: rgba(11,17,32,0.72);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: height 0.36s cubic-bezier(0.5, 0, 0.2, 1),
              border-color 0.36s ease,
              background 0.36s ease;
}
.fx-v10-scroll-condense-ocean-14622 .lg {
  width: 26px;
  height: 26px;
  border-radius: 0.4rem;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  transition: width 0.36s cubic-bezier(0.5, 0, 0.2, 1),
              height 0.36s cubic-bezier(0.5, 0, 0.2, 1);
}
.fx-v10-scroll-condense-ocean-14622 .hd b {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f1f5f9;
  transition: font-size 0.36s cubic-bezier(0.5, 0, 0.2, 1);
}
.fx-v10-scroll-condense-ocean-14622 .hd nav {
  display: flex;
  gap: 0.55rem;
  margin-left: auto;
  font-size: 0.68rem;
  color: #64748b;
  opacity: 1;
  transition: opacity 0.24s ease;
}
.fx-v10-scroll-condense-ocean-14622 .bd {
  display: grid;
  gap: 0.5rem;
  padding: 68px 0.8rem 0.8rem;
  transition: transform 0.36s cubic-bezier(0.5, 0, 0.2, 1);
}
.fx-v10-scroll-condense-ocean-14622 .bd span {
  height: 9px;
  border-radius: 3px;
  background: #1e293b;
}
.fx-v10-scroll-condense-ocean-14622 .bd .s { width: 64%; }
.fx-v10-scroll-condense-ocean-14622:hover .hd {
  height: 38px;
  background: rgba(11,17,32,0.92);
  border-bottom-color: rgba(99,102,241, 0.4);
}
.fx-v10-scroll-condense-ocean-14622:hover .lg { width: 18px; height: 18px; }
.fx-v10-scroll-condense-ocean-14622:hover .hd b { font-size: 0.74rem; }
.fx-v10-scroll-condense-ocean-14622:hover .hd nav { opacity: 0; }
.fx-v10-scroll-condense-ocean-14622:hover .bd { transform: translateY(-42px); }
ocean-condensing-header-14623.html
<div class="fx-v10-scroll-condense-ocean-14622">
  <header class="hd">
    <i class="lg"></i>
    <b>Hoverlab</b>
    <nav>
      <span>Docs</span>
      <span>Pricing</span>
    </nav>
  </header>
  <div class="bd">
    <span></span>
    <span class="s"></span>
    <span></span>
    <span></span>
    <span class="s"></span>
    <span></span>
  </div>
</div>

What do I do with this?

  1. Put ocean-condensing-header-14623.css anywhere your page already loads CSS from — in Next.js that is app/globals.css, or any stylesheet with a <link> in your HTML.
  2. Then put the class on the element you want it on: <button class="fx-v10-scroll-condense-ocean-14622">. The CSS does nothing until a class name in it matches something on the page.
  • Link the stylesheet, then paste the markup wherever you need it.
npx hoverlab add ocean-condensing-header-14623

What's included

  • The markup and the stylesheet, in whichever framework you pick
  • No runtime dependencies

Works with

  • React
  • Vue
  • Svelte
  • Tailwind
  • styled-components
  • Plain CSS

npx hoverlab add ocean-condensing-header-14623

Or over MCP, from your editor's agent — no account needed.

License

Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.

Was this useful?

Motion safety

Static estimate, read from the CSS

Reduced motion
Brief motion, no guard

Animates briefly or on interaction. Only looping motion gets a guard in this catalog; copy the one from the Insights tab if this ships on a critical path.

What it animates
Reflows

Animates font-size, height, width (and background). The browser re-lays-out the page on every frame; prefer transform if you can.

Flashing (WCAG 2.3.1)
No flashing found

No repeating change in opacity, colour or brightness large enough to count as a flash.

Layout shift (CLS)
May shift layout

Animates font-size, height, width on a box in flow, so content beside or after it can move. A category from the CSS, not a measurement for this effect.

Every row is read from the shipped CSS. Only a figure marked measured came from a browser. Customizing the speed changes the timing, so recheck a customized copy. How it is computed

30 more effects in Scroll & Sticky

All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.

Browse Scroll & Sticky

Shipping one commercially

Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.

  • A commercial licence for everything in the catalog
  • Unlimited bundle exports, in Vue, Svelte and Tailwind
  • One payment — no subscription, nothing to renew
Pro — $79 once

7 variations of Ocean Condensing Header

Finished looks, each one a position in the customizer above. Copy any of them, or open it and keep moving the sliders.