@lassi/glass
v1.0.0
Published
Add Glass effects to HTML elements
Downloads
2
Readme
GLASS
Add a shining glass effect to elements in your web page
There are two files you need to add to your web page in order to get effects
- glass.css
- glass.js
You can get these two files through npm
To install in current project (folder)
$ npm install @lassi/glass
$ npm install
To install gloabally then add to project
$ npm install -g @lassi/glass
$ npm install @lassi/glass
$ npm install
you can find two files in node_modules/glass
folder
glass.js
needs JQuery support. Please add JQuery to your webpage before adding glass.js
How to use
Check the example in sample
folder
- Add css class
glass
to an element for default glass effect - Modify default effect by adding fallowing attributes
data-shining-color
: Change the color of shine. This value can be a rgb, rgba function, color name or a # codedata-shining-duration
: Change the duration of shining effect. Can be seconds (s) or miliseconds (ms)data-shining-opacity
: Change the opacity of the shine. Must be a value between 1 and 0