0.1.3 • Published 3 years ago

psk-loadingbar v0.1.3

Weekly downloads
13
License
GPLv3
Repository
github
Last release
3 years ago

psk-loadingbar

Vue component with animated horizontal bar.

Ideal to be displayed while a process is waiting to be completed, such as the response to an http request.

Install

Create a new vue project:

vue create

Install component:

npm install --save psk-loadingbar

Environment setting

Make a src/resources folder at the root:

mkdir src/resources

Configure the psk-loadingbar

Create the src/resources/psk-loadingbar.js:

import Vue from "vue";
import LoadingBar from "psk-loadingbar";
import "psk-loadingbar/dist/LoadingBar.css";

Vue.use(LoadingBar, { LoadingBarName: "MyLoadingBar" });

Import psk-loadingbar and dependencies

The "src/main.js" file should look like this:

import Vue from "vue";
import App from "./App.vue";

import "./resources/psk-loadingbar";

Vue.config.productionTip = false;

new Vue({
    render: h => h(App),
}).$mount("#app");

How to use (example in App.vue)

<template>
    <div>
        <my-loading-bar :animate="true" :fgClass="my-color" />
    </div>
</template>

<style>
.my-color {
    background-color: red;
}
</style>

Properties

PropertyDescriptionRequiredDefault
animateStart animationnoyes
resetOnStopClear the bar status when the animation stopsnoyes
bgClassBackground CSS classno-
fgClassForeground CSS classno-

Using in the browser

To use directly in the browser, import psk-loadingbar:

<script src="https://unpkg.com/psk-loadingbar" />
0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago