Skip to content

voronianski/react-blur

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React component for creating blurred backgrounds using canvas.

Live demo

react-blur

Installation

npm install react-blur --save

Usage

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

Add styles

@import url(node_modules/react-blur/dist.css);

Example

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

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

Props.

  • img: The image path.
  • blurRadius: The size of the blur radius.
  • resizeInterval: Optional. How fast the canvas should re-render on resize? Defaults to 128ms.

Thanks to Quasimodo for the original stack blur algorithm.

About

React component for blurred backgrounds.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.4%
  • CSS 0.6%