A Polymer element for masking the images with basic (and some extraordinary) geometric shapes
Install from npm registry:
npm install polymer-image-mask
Import Custom Element as a script with type module
or ES
module:
<script src="https://github.com/httpstersk/image-mask/raw/master/image-mask.js" type="module"></script>
import { ImageMask } from 'polymer-image-mask';
Start using it!
<image-mask></image-mask>
Attribute | Description | Options | Default |
---|---|---|---|
shape |
The shape attribute sets a masking shape |
circle , triangle , square , hexagon , octagon , star , rhombus , parallelogram , plus , squircle , ring |
circle |
size |
The size attribute sets a size of an element |
int | 320 |
src |
The src attribute defines a path to an image that will be masked |
string | http://placehold.it/320 |
title |
The title attribute sets a short description of an image |
string | - |
desc |
The desc attribute sets a long description of an image |
string | - |
<image-mask shape="circle" size="320" src="https://github.com/httpstersk/image-mask/raw/master/img/image.jpg" title="A short description of an image" desc="A long description of an image"></image-mask>
git checkout -b my-freaking-cool-feature
git commit -m 'Add some freaking cool feature'
git push origin my-freaking-cool-feature
For detailed changelog, check Releases.