React Blur Save

React component to blur image backgrounds using canvas.

Project README

React Blur

React component for creating blurred backgrounds using canvas.

react-blur

Installation

npm install react-blur --save

Usage

import Blur from "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

Thanks to Quasimodo for the original stack blur algorithm.

Open Source Agenda is not affiliated with "React Blur" Project. README Source: javierbyte/react-blur
Stars
450
Open Issues
6
Last Commit
2 years ago
License

Open Source Agenda Badge

Open Source Agenda Rating