1.2.1 • Published 4 years ago

blurify v1.2.1

Weekly downloads
23
License
MIT
Repository
github
Last release
4 years ago

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

1.2.1

4 years ago

1.2.0

5 years ago

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago