# vue-styled-shadows

> Vue Styled Shadows Styled shadows for images. Supports SSR and IE11!

Latest version **0.1.8** (published 2020-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-styled-shadows
pnpm add vue-styled-shadows
yarn add vue-styled-shadows
bun add vue-styled-shadows
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2020-08-28 |
| First published | 2020-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 33.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Julian Lagerberg |
| Maintainers | juliandreas |
| Keywords | vue, vuejs, vue.js, vue2, pattern, csspattern, background, image, library, shadowpattern, shadow, styled shadows |

## Links

- npm: https://www.npmjs.com/package/vue-styled-shadows
- Repository: https://github.com/juliandreas/vue-styled-shadows
- Homepage: https://vue-styled-shadows.netlify.app/
- Issues: https://github.com/juliandreas/vue-styled-shadows
- npm.io page: https://npm.io/package/vue-styled-shadows

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.8 (latest) — 2020-08-28
- 0.1.7 — 2020-08-28
- 0.1.6 — 2020-08-27
- 0.1.5 — 2020-08-27
- 0.1.4 — 2020-08-27
- 0.1.3 — 2020-08-27
- 0.1.2 — 2020-08-27
- 0.1.1 — 2020-08-27
- 0.1.0 — 2020-08-27

## README

<h1 align="center">Vue Styled Shadows</h1>
<p align="center">
Styled shadows for images. Supports SSR and IE11!
</p>

<p align="center">
<a href="https://www.npmjs.com/package/vue-styled-shadows"><img src="https://img.shields.io/npm/v/vue-styled-shadows.svg?style=flat-square"/> <img src="https://img.shields.io/npm/dt/vue-styled-shadows.svg?style=flat-square"/></a> <a href="https://vuejs.org/"><img src="https://img.shields.io/badge/vue-2.x-brightgreen.svg?style=flat-square"/></a>
</p>

<p align="center">
<img src="./vue-styled-shadows.jpg" alt=""/>
</p>

## Demo

- [Demo](https://vue-styled-shadows.netlify.app/)
  <!-- - [CodeSandbox](https://codesandbox.io/s/vue-toggles-mkkp4?file=/src/App.vue) -->

## Installation

```
npm i vue-styled-shadows
```

### Import

```javascript
import Vue from 'vue';
import VueStyledShadows from 'vue-styled-shadows';

Vue.component('VueStyledShadows', VueStyledShadows);
```

### SSR import (Nuxt for example)

```javascript
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).

```html
<VueStyledShadows>
  <img />
</VueStyledShadows>
```

## Options

You can also add more props to customize things like type, color and size etc.

```html
<VueStyledShadows type="lines" position="bottomRight" margin="50" patternSize="3">
  <img />
</VueStyledShadows>
```

## Properties

| Name        | Type             | Default       | Description                                                       |
| ----------- | ---------------- | ------------- | ----------------------------------------------------------------- |
| type        | String           | `dots`        | Type of pattern [dots, lines, diagonal]                           |
| position    | String           | `bottomLeft`  | Shadow position [bottomLeft, bottomRight, topLeft, topRight]      |
| margin      | [String, Number] | `50`          | Margin between image and shadow                                   |
| bgSize      | [String, Number] | `40`          | Background size                                                   |
| patternSize | [String, Number] | `3`           | Pattern size                                                      |
| color1      | String           | `#504D2E`     | Main color of pattern                                             |
| color2      | String           | `transparent` | Secondary color of pattern (Only valid for dots and lines)        |
| bgColor     | String           | `transparent` | Background color                                                  |
| degree      | [String, Number] | `45`          | Degree (Only valid for diagonal)                                  |
| reverse     | Boolean          | `false`       | Reverse z-index between pattern and image                         |
| vssid       | String           | `null`        | Sets an id-attribute on the shadow (Useful for animations i.e.)   |
| vssclass    | String           | `null`        | Sets a class-attribute on the shadow (Useful for animations i.e.) |

### License

[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/vue-styled-shadows · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
