vue3-shimmer

Creates a loading placeholder, just like facebook cards
15,113 3
Install
npm install vue3-shimmer
Latest Version:1.0.2
Vue:3
License:ISC
Last Updated:Jul 24, 2021
Links: GitHub  ·  npm
Maintainer: prafful1998

Vue 3 Shimmer

A vue 3 library that provides an easy way to add a shimmer effect to any view in your vue.js app. It is useful as an unobtrusive loading indicator just like facebook cards.

Installation

npm install vue3-shimmer

Usage

Register the shimmer plugin

Register the plugin globally in your app

import { createApp } from 'vue';
import App from './App.vue';
import Shimmer from 'vue3-shimmer';

const app = createApp(App);
app.use(Shimmer);

app.mount('#app');

or add locally in your Vue component

import { CardShimmer, ParagraphShimmer, FreeStyleShimmer } from 'shimmer'

export default {
  components: {
     CardShimmer,
     ParagraphShimmer,
     FreeStyleShimmer,
  },
}

Card Shimmer

<card-shimmer :is-loading="true" />

Paragraph Shimmer

<paragraph-shimmer :is-loading="true" :lines="4" :random-size="true" />

Free Style Shimmer

<free-style-shimmer
  :is-loading="true"
  height="100px"
  width="100px"
  border-radius="50px"
  color="#bdbdbd"
/>

Props

Card Shimmer

Property Type values description default
is-loading Boolean true false Shimmer is visible only if passed true true

Paragraph Shimmer

Property Type values description default
is-loading Boolean true false Shimmer is visible only if passed true true
lines Number any number Denotes number of lines in paragraph 3
random-size Boolean true false The width of line is always random if passed true else width is 100% true

Free Style Shimmer

Property Type values description default
is-loading Boolean true false Shimmer is visible only if passed true true
width String 10px 1.5rem 80% Width of your shimmer component
height String 10px 1.5rem 80% Height of your shimmer component
border-radius String 10px 1.5rem 80% Border radius of your shimmer component 5px
color String #fbfbfb rgb(211,211,211) Background color of your shimmer component rgb(211,211,211)

License

MIT License

Copyright (c) 2021 Prafful Lachhwani

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Related Packages

@2alheure/vue-safe-mail

A Vue.js component to safely print your email on your website

1,353 1
@2alheure/vue-pagination

A simple Vue.js component that helps to print and handle a pagination

402 0
@jbtje/vue3pdf

vue.js pdf viewer

5,609 16
@jbtje/vite-vue3pdf

vite-vue.js pdf viewer

12,929 9
vueginate

A simple pagination component for Vue 3

12,261

Version History

Version Released License
1.0.2 ISC
1.0.1 ISC
0.0.1