Skip to content

An plugin for automatically generate box-shadow for image based on image colors

License

Notifications You must be signed in to change notification settings

DSlike/image_shadow_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image_shadow_generator

An plugin for automatically generate box-shadow for image based on image colors.

Demo image

Usage:

  • Connect script file to your page
  • Initialize plugin
const _isg = new ImageShadowGenerator()
  • Enjoy!

Initialize Example

  const _isg = new ImageShadowGenerator({
    imgClass: 'myImageClass',
    offsetX: 10
  })

Configs

Setting Description Default
offsetX Offset for x coordinate of shadow in percents 0
offsetY Offset for y coordinate of shadow in percents 0
imgClass className of img elements which need to be glowed _isg
shadowBlur Size of blurring for shadow in percentages 40
hoverBlurSize Size of blurring on hover for shadow in percentages 90
hover className of img elements which need to be glowed false
debug className of img elements which need to be glowed false

Debug mode shadows map

Debug image

About

An plugin for automatically generate box-shadow for image based on image colors

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published