loader-quark

This quark is a simple vue plugin with a loader component.
487
Install
npm install loader-quark
Latest Version:1.0.12
Vue:3
Last Updated:Jun 12, 2024
Links: npm
Maintainer: puroki

Loader Quark

This quark is a simple vue plugin with a loader component.

Installation

npm install loader-quark --save

Setup

main.js

//...
import {Loader} from "loader-quark"
import "loader-quark/dist/style.css"

//...
const app = createApp(App)
//...

app.use(Loader)

Import the quark and its styles in the main javascript file and use it as a plugin in your app.

Basic Usage

AnyComponent.js

<script setup>
   //...
   const loading = ref(false)
   
   // Perform some data loading, for example some api call
   try {
       loading.value = true // Set loading to true in the beginning
       const response = await fetch('https://api.example.com/data')
       const data = await response.json()
   } catch (error) {
       console.error(error)
   } finally {
       loading.value = false // After the data is loaded, set loading to false
   }
</script>

<template>
   <Loader v-if="loading" type="spinner" primary-color="#7842f5"/>
   <div v-else>
      <!-- ... -->
   </div>
</template>

You can use easy conditional rendering to display the loader component for example when waiting for your data to load from backend.

DOCS

Full docs at https://www.quarksjs.com/library/loader-quark/getting-started.

Source code at https://github.com/SamuelSlavik/LoaderQuark

SUPPORT

Please support us by starring the repository or donate at https://www.quarksjs.com/donate to help us maintain the project and cover hosting expenses.

Related Packages

vue-script2

Brings back to your favorite Single Page App!

238,756 168
vue-scriptx

VueScriptX brings back the tag to your Vue projects!

80,193 11
vue-loading-overlay

Vue.js component for full screen loading indicator.

2,880,068 1,261
vue-full-loading

Full overlay with spinner for Vue

47,801 164

Version History

Version Released Vue License
1.0.12 ^3.3.11
1.0.11 ^3.3.11
1.0.10 ^3.3.11
1.0.9 ^3.3.11
1.0.8 ^3.3.11