About this set
A tall 104px header that condenses to 62px once the page has scrolled 40px, with the logo shrinking from 1.5rem to 1.08rem and a soft shadow appearing underneath. It suits a landing page that wants a generous first impression without giving up space while reading. The header is fixed, and a spacer of its full height sits after it in the page flow, so as it condenses nothing below it moves. A short script toggles a single data-condensed attribute from a passive scroll listener, and CSS transitions do the rest; there is no per-frame style writing. On phones the bar starts at 74px and condenses to 56px. Below 992px the four links fold behind a menu button while the Book a demo button stays in the bar. The Bootstrap version uses .fixed-top on a .navbar-expand-lg and the same attribute.
What’s included
- Condenses from 104px to 62px after 40px of scroll
- Fixed header plus spacer, so the page never jumps
- One data-condensed attribute drives every change
- Menu button below 992px with the call to action still visible
- Transitions switch off under reduced motion
Accessibility
The links sit in a nav labelled Main and the current one has aria-current="page". The spacer is aria-hidden. 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 and button shows a 2px indigo outline on keyboard focus, and under prefers-reduced-motion the header changes size instantly instead of animating.
Customise it
Change the two min-heights (104px and 62px) and logo sizes on .sk and .sk[data-condensed], keeping .sk-spacer the same height as the tall state, and the 40 in the script for the threshold. In Tailwind edit min-h-[104px] and data-condensed:min-h-[62px].



















