Progressive Blur Effect For React

Description:

A React component to apply a drop-in progressive (gradient) backdrop blur to your React applications. Supports both radial and linear gradients.

How to use it:

1. Install & download.

# Yarn
$ yarn add progressive-blur

2. Import the RadialBlur and/or LinearBlur components.

import { RadialBlur, LinearBlur } from "progressive-blur";

3. Add the progressive blur effect to your app.

<RadialBlur
  // The resolution of the blur.
  steps={8}
  // The blur radius of the blur in pixels at the peak of the gradient. 
  strength={64}
  // How much of the blur is falloff. 0 means no falloff, 100 means the entire blur is falloff.
  falloffPercentage={100}
  // The tint applied to the blur. This can be any valid CSS color. 
  tint="rgba(0, 0, 0, 0.1)"
  // You can pass any div props to the component. 
  style={{
    position: "absolute",
    inset: 0,
    zIndex: -1,
  }}
/>
<LinearBlur
  // Same props as RadialBlur, but with an additional side prop that specifies the direction of the gradient and the transform origin so it's easy to scale in the right direction.
  side="top"
/>

Preview:

Progressive Blur Effect For React

Add Comment