vuetify-loading-overlay

Full page screen loading for vuetify
1,963 3
Install
npm install vuetify-loading-overlay
Latest Version:1.0.4
License:MIT
Last Updated:Jun 22, 2020
Links: GitHub  ·  npm
Maintainer: wimil

Vuetify loading overlay

This package serves to display a load on the whole page, useful when you expect an ajax response from an API. It only works with the vuetify framework, since it uses components of it.

Install

npm -i vuetify-loading-overlay
yarn add vuetify-loading-overlay

Usage

Vue

import {LoadingPlugin} from "vuetify-loading-overlay"
Vue.use(LoadingPlugin, {
    //props
    spinnerProps: {},
    overlayProps: {},
});

Nuxt

for nuxt you have to create a plugin and add it to your nuxtconfig

import Loading from "vuetify-loading-overlay"
export default ({ app }, inject) => {
  inject(
    "vloading",
    Loading({
      spinnerProps: {},
      overlayProps: {},
    })
  );
};

Example

<template>
    <form @submit.prevent="submit">
        <input type="text" name="email" />
        <input type="password" name="password" />
        <button type="submit">Login</button>
    </form>
</template>

<script>
    export default {
        data() {
            return {
            }
        },
        methods: {
            submit() {
                this.$vloading.show();
                // simulate AJAX
                setTimeout(() => {
                  this.$vloading.hide()
                },5000)                 
            },
            onCancel() {
              console.log('User cancelled the loader.')
            }                      
        }
    }
</script>

the use is simple, you just have to call the api and its methods this.$vloading.show() this.$vloading.hide()

Props

snipperProps
{
    color: "primary"
}

You can check the properties of the spinner in its official documentation

overlayProps
{
    color: "red"
}

You can check the properties of the overlay in its official documentation

Author

rldev25

Licence

MIT

Related Packages

v-snackbars

Display the v-snackbar (from Vuetify) with a stack display

92,647 110
@nextgis/vuetify-notice

component to display quick message and dialog to a user

1,621 0
@web-types/vuetify

Web-types for vuetify

93,870 306
vuetify-crud

Vuetify CRUD module

4,404 2
ts-vuetify-dom-datatable

Typescript augmented vuetify datatable

2,368

Version History

Version Released License
1.0.4 MIT
1.0.3 MIT
1.0.2 MIT
1.0.1 MIT
1.0.0 MIT