Vue Loaders

4.1.4 · active · verified Sun Apr 19

vue-loaders is a JavaScript library providing Vue.js component wrappers for the popular loaders.css library, which offers a collection of animated loading indicators. The current stable version is 4.1.4. The project actively maintains support for both Vue 2 and Vue 3, with v4.0.0 introducing compatibility for Vue 3. Releases are made on an as-needed basis for features and bug fixes, indicated by recent minor version bumps and a major version increment for Vue 3 support. It differentiates itself by offering flexible integration options: developers can register all loaders globally via a plugin, import individual loader components directly, or dynamically render loaders using a single vue-loaders component with a name prop. It also ships with TypeScript types, improving developer experience in typed environments.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates how to register all loaders globally using `Vue.use(VueLoaders)` and then utilize both the dedicated component syntax (`<vue-loaders-ball-beat>`) and the dynamic `name` prop approach (`<vue-loaders name="ball-beat">`). It also includes the necessary CSS import for styling.

import Vue from 'vue/dist/vue.esm.browser';
import 'vue-loaders/dist/vue-loaders.css';
import VueLoaders from 'vue-loaders';

Vue.use(VueLoaders);

const template = `
<div>
  <vue-loaders-ball-beat color="red" scale="1"></vue-loaders-ball-beat>
  <hr/>
  <vue-loaders name="ball-beat" color="red" scale="1"></vue-loaders>
</div>
`;

new Vue({
  template
}).$mount('#app');

view raw JSON →