# @topd5/v-loading

> v-loading directive for Vue 3 apps

Latest version **1.0.0** (published 2023-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @topd5/v-loading
pnpm add @topd5/v-loading
yarn add @topd5/v-loading
bun add @topd5/v-loading
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-01-29 |
| First published | 2023-01-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dmitriy Zhuravlev |
| Maintainers | topd5 |

## Links

- npm: https://www.npmjs.com/package/@topd5/v-loading
- Repository: https://github.com/topd5/v-loading
- Homepage: https://github.com/topd5/v-loading#readme
- Issues: https://github.com/topd5/v-loading/issues
- npm.io page: https://npm.io/package/@topd5/v-loading

## Recent versions

- 1.0.0 (latest) — 2023-01-29

## README

# v-loading
Lightweight v-loading directive for the Vue 3 apps.

## Adding to a Vue 3 application:
```js
import vLoading from '@topd5/v-loading';
import '@topd5/v-loading/v-loading.css';
// ...
const app = createApp(App);
app.directive('loading', vLoading());
```
## Using:
```html
<div v-loading="true">
  Some text
  <some-component></some-component>
</div>
```
## Styling
You can change spinner styling via changing CSS variables:
`--v-l-loader-background-color`,  
`--v-l-spinner-color`,
`--v-l-circle-stroke-width`,
`--v-l-loader-content-animation-duration`.

## Some simple config
You can replace the default spinner with your HTML or disable rotation:
```js
app.directive('loading', vLoading({
  disableRotate: true,
  loaderHtml: '<div class="some-your-class">Loading...</div>',
}));
```

Attention! `v-loading` automatically adds `position: relative` to element if it has `position: static` style.

---
_Source: https://npm.io/package/@topd5/v-loading · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
