react-blur

React component for blurred backgrounds.

Github星跟踪图

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.

主要指标

概览
名称与所有者javierbyte/react-blur
主编程语言JavaScript
编程语言JavaScript (语言数: 3)
平台
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2015-03-05 04:13:58
推送于2022-05-03 04:36:21
最后一次提交2022-01-04 03:37:39
发布数3
最新版本名称0.3.0 (发布于 )
第一版名称0.2.0 (发布于 )
用户参与
星数465
关注者数14
派生数49
提交数110
已启用问题?
问题数14
打开的问题数6
拉请求数14
打开的拉请求数1
关闭的拉请求数24
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?