Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

progressive-blur

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

progressive-blur

Drop-in progressive blur for React.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Progressive Blur

Drop-in progressive (gradient) backdrop blur for React. Both radial and linear gradients are supported.

https://github.com/AndrewPrifer/progressive-blur/assets/2991360/9bcfaae7-5976-449b-994c-3785a0f961a1

Demo

Installation

yarn add progressive-blur

Usage

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

const App = () => (
  <div>
    <RadialBlur
      // The resolution of the blur. Higher values will result in a more detailed blur, but will be more computationally expensive. Default is 8.
      steps={8}
      // The blur radius of the blur in pixels at the peak of the gradient. Default is 64.
      strength={64}
      // How much of the blur is falloff. 0 means no falloff, 100 means the entire blur is falloff. Default is 100.
      falloffPercentage={100}
      // The tint applied to the blur. This can be any valid CSS color. Default is transparent.
      tint="rgba(0, 0, 0, 0.1)"
      // You can pass any div props to the component. Useful for positioning.
      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. Default is "top".
      side="top"
    />
  </div>
);

Keywords

FAQs

Package last updated on 19 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc