0.1.8 • Published 4 years ago

vue-styled-shadows v0.1.8

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

Demo

Installation

npm i vue-styled-shadows

Import

import Vue from 'vue';
import VueStyledShadows from 'vue-styled-shadows';

Vue.component('VueStyledShadows', VueStyledShadows);

SSR import (Nuxt for example)

import Vue from 'vue';
import VueStyledShadows from 'vue-styled-shadows/dist/vue-styled-shadows.ssr';
import 'vue-styled-shadows/dist/vue-styled-shadows.ssr.css';

Vue.component('VueStyledShadows', VueStyledShadows);

Usage

You can use the library without any props and it will use the default settings (see properties below).

<VueStyledShadows>
  <img />
</VueStyledShadows>

Options

You can also add more props to customize things like type, color and size etc.

<VueStyledShadows type="lines" position="bottomRight" margin="50" patternSize="3">
  <img />
</VueStyledShadows>

Properties

NameTypeDefaultDescription
typeStringdotsType of pattern dots, lines, diagonal
positionStringbottomLeftShadow position bottomLeft, bottomRight, topLeft, topRight
marginString, Number50Margin between image and shadow
bgSizeString, Number40Background size
patternSizeString, Number3Pattern size
color1String#504D2EMain color of pattern
color2StringtransparentSecondary color of pattern (Only valid for dots and lines)
bgColorStringtransparentBackground color
degreeString, Number45Degree (Only valid for diagonal)
reverseBooleanfalseReverse z-index between pattern and image
vssidStringnullSets an id-attribute on the shadow (Useful for animations i.e.)
vssclassStringnullSets a class-attribute on the shadow (Useful for animations i.e.)

License

MIT