react-blur

React component for blurred backgrounds.

Github stars Tracking Chart

React Blur

styled with prettier

React component for creating blurred backgrounds using canvas.

Live demo

react-blur

Installation

npm install react-blur --save

Usage

var Blur = require('react-blur');

Example

<Blur img='/directory/img.jpg' blurRadius={5} enableStyles>
  The content.
</Blur>

For a complete example see the code in the demo branch.

Props

  • img: The image path.
  • blurRadius: Optional. The size of the blur radius.
  • enableStyles: Optional. Flag to include base styles inline, omit this to easily override.
  • shouldResize: Optional. If the canvas should re-render on resize? Defaults to true.
  • resizeInterval: Optional. How fast the canvas should re-render on resize? Defaults to 128ms.

Contributing

Please install yarn and use it to manage dependencies and the lockfile.

Thanks to Quasimodo for the original stack blur algorithm.

Main metrics

Overview
Name With Ownerjavierbyte/react-blur
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 3)
Platform
License:BSD 3-Clause "New" or "Revised" License
所有者活动
Created At2015-03-05 04:13:58
Pushed At2022-05-03 04:36:21
Last Commit At2022-01-04 03:37:39
Release Count3
Last Release Name0.3.0 (Posted on )
First Release Name0.2.0 (Posted on )
用户参与
Stargazers Count465
Watchers Count14
Fork Count49
Commits Count110
Has Issues Enabled
Issues Count14
Issue Open Count6
Pull Requests Count14
Pull Requests Open Count1
Pull Requests Close Count24
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private