Note: This project is still in development and has not been publicly released. Coming soon.
Docs
Progressive Blur
Progressive Blur

A customizable progressive blur effect component for creating smooth fade transitions at container edges with automatic theme integration.

8 views
0 downloads

A progressive blur component that creates smooth fade and blur effects at the top or bottom of containers. Perfect for creating scroll fade effects, content overlays, and modern UI transitions. Uses multiple blur layers and automatic theme integration.

Loading...

Overview

The ProgressiveBlur component applies a progressive blur effect using backdrop filtering combined with CSS gradients and masking. It automatically uses your theme's background color for seamless integration with light and dark modes. The blur effect can be toggled with the blurEnabled prop.

Installation

pnpm dlx shadcn@latest add https://deltacomponents.dev/r/progressive-blur.json

Usage

Basic Usage

1import ProgressiveBlur from "@/registry/components/progressive-blur"
2
3export function Component() {
4 return (
5 <div className="relative h-96 bg-background overflow-hidden">
6 <ProgressiveBlur position="top" height="150px" blurAmount="4px" />
7 {/* Your content here */}
8 </div>
9 )
10}

Disabled Blur (Mask Only)

1import ProgressiveBlur from "@/registry/components/progressive-blur"
2
3export function Component() {
4 return (
5 <div className="relative h-96 bg-background overflow-hidden">
6 <ProgressiveBlur position="top" height="150px" blurEnabled={false} />
7 {/* Your content here */}
8 </div>
9 )
10}

API Reference

NameTypeDefaultDescription
classNamestring""Additional CSS classes to apply to the blur overlay
backgroundColorstring"hsl(var(--background))"Background color for the gradient. Defaults to theme background
position"top" | "bottom""top"Whether to apply the blur effect at the top or bottom
heightstring"150px"Height of the blur effect area
blurAmountstring"4px"Intensity of the backdrop blur effect
blurEnabledbooleantrueWhether to apply the blur effect. When false, shows only the mask effect

Theme Integration

The component automatically uses your shadcn theme's background color via hsl(var(--background)). This ensures:

  • Automatic theme switching: Works seamlessly with light and dark modes
  • Consistent design: Matches your theme's color palette perfectly
  • Custom backgrounds: Override with any CSS color value when needed

Examples

1// Basic blur effect (recommended)
2<ProgressiveBlur position="top" height="150px" />
3
4// Custom height and blur amount
5<ProgressiveBlur position="bottom" height="200px" blurAmount="8px" />
6
7// Mask-only effect (no blur)
8<ProgressiveBlur position="top" blurEnabled={false} />
9
10// Custom background color
11<ProgressiveBlur position="top" backgroundColor="hsl(var(--card))" />
12
13// Multiple positions
14<>
15 <ProgressiveBlur position="top" />
16 <ProgressiveBlur position="bottom" />
17</>

Examples

Without Blur Effect

Shows the progressive mask effect without the blur layers:

Loading...