box-shadow
Create a CSS box shadow using JS objects
Install
$ npm install --save box-shadow
Usage
var boxShadow = //=> 0px 2px 3px 4px rgba(204,54,51,1)
API
boxShadow(data)
-> string
data
Required
Type: object
/ array[object]
An object containing CSS properties for the box shadow:
- x
- y
- blur
- spread
These can be strings (1em
) or numbers to be converted to pixels (2
-> 2px
).
Additionally, data
requires a color
property to be passed to color-style. This can be a simple string (red
) or an array of RGBA values ([204, 54, 51, 0.5]
).
License
MIT © Ben Drucker