react-css-blur
A React component that uses CSS filters to apply a blur to any DOM element. CSS Filters are currently supported by most modern browsers. See up-to-date compatibility info here.
Install
npm install --save react-css-blur
Then, in your React project:
var Blur = ;
Or, if you're using ES6/ECMA2015 syntax:
How to Use
The <Blur />
component accepts two props:
radius
: a size value in any CSS units (e.g.5px
). Default value: 0.transition
: a time value in any CSS units (e.g.500ms
). Default value: 0.
Example
Component state = blurOn: false ; { this; } { return <div id="App"> <Blur radius= thisstateblurOn ? '5px' : '0' transition="400ms"> <h1 onMouseEnter= this onMouseLeave= this > Hover Me </h1> </Blur> </div> ; }
Dependencies
None!
License
MIT