# Progressive Blur Header Effect

> Creating elegant header transitions with CSS and Tailwind

Published: 2024-11-23  
Tags: css, ui  
Source: https://www.rege-dev.xyz/writing/progressive-blur-header


_Interactive demo: https://www.rege-dev.xyz/writing/progressive-blur-header_

```tsx
<div className="relative h-[450px] w-full overflow-y-auto bg-background">
  {/* Progressive Blur Header */}
  <header className="sticky left-0 top-0 z-10 h-40 w-full bg-background/80 backdrop-blur-sm [mask-image:linear-gradient(to_bottom,black_20%,transparent)]">
    <div className="absolute -top-5 h-[50px] w-full bg-background/50 blur-md" />
  </header>

  {/* Content Container */}
  <div className="relative -mt-40 mx-auto max-w-full space-y-6 px-8 pt-4">
    {/* Sticky Title */}
    <h1 className="sticky top-4 z-20 text-lg font-bold text-foreground">
      Progressive Blur Header Effect
    </h1>

    {/* Content */}
    <div className="space-y-4 pb-32 text-sm leading-relaxed text-foreground/80">
      <p>This demonstrates a progressive blur header effect...</p>
      <p>Scroll to see how the content smoothly transitions.</p>
    </div>
  </div>
</div>
```

A progressive blur header creates an elegant transition effect where content smoothly fades as it passes under the header. This technique adds depth and visual hierarchy to your designs.

The effect combines backdrop-filter for the blur, a gradient mask for the fade, and a sticky title for enhanced readability.

This pattern is commonly seen in modern web applications and reading interfaces, providing a sophisticated way to maintain context while scrolling.
