Installation
Usage
Examples
Bottom Blur (Default)
Top Blur
Both Top and Bottom
Custom Blur Levels
Over Scrollable List
Component API
ProgressiveBlur
Position of the blur effect.
top: Blur at the top edgebottom: Blur at the bottom edge (default)both: Blur on both top and bottom edges
Height of the blur area. Can be any CSS unit (%, px, rem, etc.).When
position="both", this is automatically set to 100%.Array of blur values in pixels. Each value represents a layer of blur, creating a progressive effect.
- More values = smoother gradient
- Higher values = stronger blur
- Default provides 8 levels from 0.5px to 64px
Additional CSS classes to apply to the blur container.
Features
- Multi-layer backdrop blur for smooth progressive effect
- Position at top, bottom, or both edges
- Customizable blur intensity levels
- Adjustable blur area height
- Webkit compatibility
- Pointer-events disabled (doesn’t interfere with content)
- Works with any scrollable container
- Automatic gradient mask generation
How It Works
The component creates multiple layereddiv elements, each with:
- backdrop-filter: Applies blur at different intensities
- mask-image: Controls which parts of the blur layer are visible
- z-index: Stacks layers for smooth blending
Technical Details
Blur Layer Structure
- First layer: Lightest blur (blurLevels[0])
- Middle layers: Progressive blur levels (blurLevels[1] to blurLevels[n-2])
- Last layer: Strongest blur (blurLevels[n-1])
Gradient Masks
Each layer uses linear gradients to control visibility:- Bottom position:
linear-gradient(to bottom, ...) - Top position:
linear-gradient(to top, ...) - Both position: Simplified gradient for full coverage
Performance
The component uses CSS backdrop-filter, which:- Is GPU-accelerated in modern browsers
- Doesn’t impact content rendering
- Provides real-time blur of underlying content
Browser Support
Includes both standard and webkit-prefixed properties:backdrop-filter(modern browsers)-webkit-backdrop-filter(Safari, older Chrome)mask-imageand-webkit-mask-image
Styling Tips
- Parent container must have
position: relative - Parent container should have
overflow: autooroverflow: scroll - Adjust
heightto control how far the blur extends - Use fewer
blurLevelsfor better performance - Use more
blurLevelsfor smoother gradients