blurify

1.2.1 • Public • Published

blurify

travis dependencies devDependencies

blurify.js is a tiny(~2kb) library to blur pictures, with graceful downgrade support from css mode to canvas mode.

Installation

$ npm i blurify

DEMO

Demo

Usage

blurify(options)

blurify the images with given options:

  • images { Element }, blurify target elements.
  • blur { Int }, extent of blur, defaulting to 6.
  • mode { String }, mode of blurify.
    • css: use filter property.(default)
    • canvas: use canvas export base64.
    • auto: use css mode firstly, otherwise switch to canvas mode by automatically.
import blurify from 'blurify';

new blurify({
    images: document.querySelectorAll('.blurify'),
    blur: 6,
    mode: 'css',
});

// or in shorthand

blurify(6, document.querySelectorAll('.blurify'));

License

Licensed under the MIT License

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.1130latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.1130
1.2.01
1.1.00
1.0.80
1.0.70
1.0.60
1.0.51
1.0.41
1.0.31
1.0.21
1.0.11
1.0.01

Package Sidebar

Install

npm i blurify

Weekly Downloads

100

Version

1.2.1

License

MIT

Unpacked Size

21 kB

Total Files

18

Last publish

Collaborators

  • justclear