npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-progressive-blur

v1.0.6

Published

A lightweight React component that creates smooth, progressive blur effects with customizable intensity and positioning. Perfect for creating modern UI overlays, video controls, and aesthetic blur gradients.

Downloads

2,816

Readme

React Progressive Blur

A lightweight React component that creates smooth, progressive blur effects with customizable intensity and positioning. Perfect for creating modern UI overlays, video controls, and aesthetic blur gradients.

Basic Example

Basic Example Basic Example

Features

  • 🎯 Progressive blur layers - Creates smooth transitions with multiple blur intensities
  • 📍 Flexible positioning - Apply blur effects to any edge (top, bottom, left, right)
  • Customizable intensity - Control the blur strength with a simple prop
  • 🎨 Tailwind CSS compatible - Seamlessly integrate with your existing styles
  • 📱 Cross-browser support - Works with both backdrop-filter and -webkit-backdrop-filter

Installation

npm install react-progressive-blur

Usage

import React from "react";
import BlurEffect from "react-progressive-blur";

export default function MyComponent() {
  return (
    <div className="relative">
      {/* Your content */}
      <img src="/your-image.jpg" alt="Background" />
      
      {/* Add blur effect */}
      <BlurEffect position="top" intensity={50} />
    </div>
  );
}

Video Overlay Example

"use client";
import React from "react";
import BlurEffect from "react-progressive-blur";

export default function VideoPage() {
  return (
    <div className="flex flex-col items-center justify-center min-h-screen bg-black">
      <div className="max-w-[80rem] mx-auto my-8">
        <div className="relative rounded-[4rem] overflow-hidden">
          {/* Video with border radius */}
          <video
            src="/demo.webm"
            className="w-full rounded-xl"
            controls
            autoPlay
            muted
            loop
          />
          
          {/* Top blur overlay */}
          <BlurEffect
            className="h-32 bg-gradient-to-b from-black/20 to-transparent"
            intensity={100}
            position="top"
          />
          
          {/* Bottom blur overlay */}
          <BlurEffect
            className="h-72 bg-gradient-to-t from-black/20 to-transparent"
            intensity={200}
            position="bottom"
          />
        </div>
      </div>
    </div>
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | className | string | '' | Additional CSS classes to apply to the blur container | | intensity | number | 50 | Blur intensity (higher values = more blur) | | position | 'top' \| 'bottom' \| 'left' \| 'right' | 'top' | Edge where the blur effect should be applied |

How It Works

The component creates three progressive blur layers with increasing intensity:

  1. Light blur (1x intensity factor) - Covers 0-25% of the specified edge
  2. Medium blur (3x intensity factor) - Covers 25-75% of the specified edge
  3. Heavy blur (6x intensity factor) - Covers 75-100% of the specified edge

Each layer uses CSS mask-image with linear gradients to create smooth transitions between blur levels.

Styling Tips

Combining with Gradients

<BlurEffect
  className="bg-gradient-to-b from-black/30 to-transparent"
  position="top"
  intensity={75}
/>

Custom Height/Width

{/* For horizontal positions (top/bottom) */}
<BlurEffect
  className="h-40"
  position="top"
  intensity={100}
/>

{/* For vertical positions (left/right) */}
<BlurEffect
  className="w-32"
  position="left"
  intensity={100}
/>

Multiple Blur Effects

<div className="relative">
  <img src="/background.jpg" alt="Background" />
  
  {/* Top blur */}
  <BlurEffect position="top" intensity={80} className="h-24" />
  
  {/* Bottom blur */}
  <BlurEffect position="bottom" intensity={120} className="h-32" />
  
  {/* Left side blur */}
  <BlurEffect position="left" intensity={60} className="w-16" />
</div>

Browser Support

This component uses modern CSS features:

  • backdrop-filter (with -webkit-backdrop-filter fallback)
  • mask-image (with -webkit-mask-image fallback)

Supported in all modern browsers. For older browser compatibility, consider adding appropriate polyfills.

License

MIT © Rakibur Rahaman

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.