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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?