# vue2-bg-image

> Vue2BgImage: Vue2 component

Latest version **0.0.15** (published 2018-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue2-bg-image
pnpm add vue2-bg-image
yarn add vue2-bg-image
bun add vue2-bg-image
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.15 |
| Published | 2018-11-30 |
| First published | 2018-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.2.0 |
| Dependencies | 1 |
| Unpacked size | 87 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | sanchit |
| Maintainers | san-kumar |
| Keywords | vue, bootstrap, Vue2BgImage, vue2-bg-image |

## Links

- npm: https://www.npmjs.com/package/vue2-bg-image
- Repository: https://github.com/san-kumar/vue2-bg-image
- Issues: https://github.com/san-kumar/vue2-bg-image/issues
- npm.io page: https://npm.io/package/vue2-bg-image

## Dependencies (1)

- [youtube-thumbnail](https://npm.io/package/youtube-thumbnail.md) ^1.3.0

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 0.0.15 (latest) — 2018-11-30
- 0.0.14 — 2018-11-10
- 0.0.13 — 2018-11-10
- 0.0.12 — 2018-11-10
- 0.0.11 — 2018-11-10
- 0.0.10 — 2018-11-09
- 0.0.9 — 2018-10-01
- 0.0.8 — 2018-09-30
- 0.0.7 — 2018-09-29
- 0.0.6 — 2018-07-05
- 0.0.5 — 2018-07-05
- 0.0.4 — 2018-07-05
- 0.0.3 — 2018-05-24
- 0.0.2 — 2018-04-23
- 0.0.1 — 2018-04-23

## README

# Vue2BgImage
> Vue2BgImage Component for Vue 2.x

## Install

``` bash
    npm install vue2-bg-image --save
```

## Demo

For demo, please [see here](https://jsfiddle.net/superasn/n25r8gvd/) 

## Usage

*1\. Import the component*

```
import Vue2BgImage from 'vue2-bg-image';
```

*2\.1 Use it globally*

```
Vue.use(Vue2BgImage);
```

*2\.2 Or use it locally*

```
components: {
    'vue2-bg-image': Vue2BgImage
},
```

*3\. Update your app or template:*
```
<div>
...
<vue2-bg-image></vue2-bg-image>
...
</div>
```

## Properties

There are no properties.

## Example

    <template>
        <div>
            <vue2-bg-image src="http://www.deelay.me/10000/https://i.ytimg.com/vi/SfBR9aGrk9k/maxresdefault.jpg" caption="Slow loading image" width="200px" height="130px" class="thumbnail"></vue2-bg-image>
    
            <vue2-bg-image src="http://www.example.com/error.jpg" caption="Missing image" width="200px" height="130px" class="thumbnail"></vue2-bg-image>
    
            <vue2-bg-image src="https://www.youtube.com/watch?v=7WAsh5XBxbw" caption="Automatic Youtube thumb" width="200px" height="130px" class="thumbnail" @click="click"></vue2-bg-image>
    
            <vue2-bg-image src="https://www.youtube.com/watch?v=7WAsh5XBxbw" caption="Automatic Youtube thumb" width="200px" height="130px" class="thumbnail" :play-button="true" @click="click"></vue2-bg-image>
    
            <vue2-bg-image src="https://i.ytimg.com/vi/SfBR9aGrk9k/maxresdefault.jpg" width="200px" height="130px" class="thumbnail">
                <button class="btn btn-danger btn-xs" type="button">
                    <i class="glyphicon glyphicon-alert"></i> HTML button
                </button>
            </vue2-bg-image>
    
            <a href="//google.com/search?q=NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN+Batman!">
                <vue2-bg-image src="https://i.imgur.com/IzxYzQO.jpg" width="200px" height="130px" class="thumbnail" caption="Clickable thumb"></vue2-bg-image>
            </a>
    
            <vue2-bg-image src="http://newimages.yachtworld.com/resize/1/55/79/4935579_20170929064458370_1_XLARGE.jpg?f=/1/55/79/4935579_20170929064458370_1_XLARGE.jpg&w=370&h=246&t=1507025624000" width="200px"
                           height="130px" class="thumbnail" :blur="5" caption="Blurred"></vue2-bg-image>
    
            <vue2-bg-image src="#ff00ff" width="200px" height="130px" class="thumbnail" caption="Solid color"></vue2-bg-image>
    
            <vue2-bg-image src="http://newimages.yachtworld.com/resize/1/55/79/4935579_20170929064458370_1_XLARGE.jpg?f=/1/55/79/4935579_20170929064458370_1_XLARGE.jpg&w=370&h=246&t=1507025624000" width="200px"
                           height="130px" class="thumbnail" :animated="50" caption="Animated"></vue2-bg-image>
        </div>
    </template>
    
    <script>
        import Vue2BgImage from '../src/index';
    
        export default {
            name: 'app',
            data() {
                return {}
            },
            components: {
                Vue2BgImage
            },
            methods: {
                click() {
                    console.log("click: ", 1);
                }
            },
        }
    </script>
    

## Contributing
Contributions are welcome

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build
```

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