# vue-loader-spinner

> Vue.js spinner plugin

Latest version **0.0.6** (published 2019-10-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-loader-spinner
pnpm add vue-loader-spinner
yarn add vue-loader-spinner
bun add vue-loader-spinner
```

## 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.6 |
| Published | 2019-10-13 |
| First published | 2019-10-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | olefirenko |
| Maintainers | olefirenko |
| Keywords | vue, spinner, plugin |

## Links

- npm: https://www.npmjs.com/package/vue-loader-spinner
- Repository: https://olefirenko@github.com/olefirenko/vue-loader-spinner
- Homepage: https://github.com/olefirenko/vue-loader-spinner#readme
- Issues: https://github.com/olefirenko/vue-loader-spinner/issues
- npm.io page: https://npm.io/package/vue-loader-spinner

## Recent versions

- 0.0.6 (latest) — 2019-10-13
- 0.0.5 — 2019-10-11
- 0.0.4 — 2019-10-10
- 0.0.3 — 2019-10-10
- 0.0.2 — 2019-10-10
- 0.0.1 — 2019-10-10

## README

# Vue Spinner Plugin

A Vue.js spinner plugin which helps easily show/hide loading spinner in whole page or only specific section of your application.

## Benefits

* No extra depencencies
* No need to add local state to each component
* Simple API: `Vue.$spinner.show()` and `Vue.$spinner.hide()`

## Installation

The easiest way to use Vue Spinner Plugin is to install it from **npm** or **yarn**.

```sh
npm install vue-loader-spinner --save
```

Or

```sh
yarn add vue-loader-spinner
```

## Usage

First, import and install the plugin. 

```html
import Vue from 'vue'
import LoaderSpinner from 'vue-loader-spinner'
Vue.use(LoaderSpinner)
```

Then in your components you can show the spinner by calling `this.$spinner.show()` and hide by calling `this.$spinner.hide()`.

You can also pass additional options to the plugin when you install it:

```html
import Vue from 'vue'
import LoaderSpinner from 'vue-loader-spinner'
Vue.use(LoaderSpinner, {
    size: 5,
    color: 'green',
    background: 'rgba(10, 10, 10, 0.5)',
})
```

### Showing splinner in specific section

To show a spinner in specific section you can provide a CSS selector to a function `this.$spinner.show('#my-block')`.

## Credits
Big thanks to [@FrontendSophie](https://github.com/FrontendSophie) for the initial idea of the spinner component.

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