npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue3-ui-preloader

v1.0.4

Published

Vue3 preloader component made with CSS transistions and animations, easy to use, integrate and customize.

Downloads

223

Readme

logo

Codacy Badge Netlify Status Language License NPM Package NPM Downloads

NPM

Remake made from: Vue-ui-preloader.

Main changes

  • Added support for Vue 3.
  • Fixed the issue where the "overflowHidden" class remained active after the first use.
  • Added options to add text to the loaders and customize them.

Demo and playground

Live demo - https://vue3-ui-preloader.netlify.app/

Playground Website. Adjust the settings using the playground options. On the bottom of the page you will find the source code that you can directly use in your project or you can manually change the props.

npm link - https://www.npmjs.com/package/vue3-ui-preloader

Vue 3 blitz link - https://stackblitz.com/edit/vue-caijgu?file=src%2FApp.vue

Installation

# use yarn
yarn add vue3-ui-preloader
# use npm
npm install --save vue3-ui-preloader

Usage

Vue 3 blitz link - https://stackblitz.com/edit/vue-caijgu?file=src%2FApp.vue

In your main.js

import { createApp } from 'vue'
import App from './App.vue'
import loader from "vue3-ui-preloader";

// Import the CSS or use your own!
import "vue3-ui-preloader/dist/loader.css"

const app = createApp(App)

app.component('loader', loader)

app.mount('#app')

In your template

<template>
	<loader  name="spinning" loadingText="LOADING..." textColor="#ffffff" textSize="20" textWeight="500" object="#ff9633" color1="#ffffff" color2="#17fd3d" size="5" speed="2" bg="#343a40" objectbg="#999793" opacity="80" :disableScrolling="true"></loader>
</template>

NOTE: The best way to control the loader is to have a flag and use it in a v-if or v-show statement. You can either use the playground website to automatically get all the props set or you can set them manaully using the below prop list. You can also resort to not passing any prop, in this case the preloader will use default settings.

Via CDN

CDN demo link - https://jsfiddle.net/1t0jyeqh/10/

In your index.html

<script src="https://unpkg.com/vue3-ui-preloader"></script>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/vue3-ui-preloader/dist/loader.css">

In your template

<div id="app">
	<loader  name="spinning" loadingText="LOADING..." textColor="#ffffff" textSize="20" textWeight="500" object="#ff9633" color1="#ffffff" color2="#17fd3d" size="5" speed="2" bg="#343a40" objectbg="#999793" opacity="80" :disableScrolling="true"></loader>
</div>

In your main.js

const { createApp } = Vue

const app = createApp(loader)

app.mount('#app')

Props

| Name | Type | Default | Description | |:-----|:-----|:--------|:------------| | name | string | 'spinning' | decides the type of loader. (Ex: spinning, dots, loading, circular, box) | | object | string | '#ff9633' | set the color of the loaders. (Ex: hex or color) | | loadingText | string | 'LOADING...' | set the text of some loaders. | | textColor | string | '#ffffff' | set the color of the loadingText. (Ex: hex or color) | | textSize | number | '15' | set the size of the loadingText. | | textWeight | number/string | '800' | set the weight of the loadingText. (Ex: 800, bold) | | color1 | string | only for circular | set the color of the circular loader disk1. (Ex: hex or color) | | color2 | string | only for circular | set the color of the circular loader disk2. (Ex: hex or color) | | size | number | 5 | set the size of loader. | | bg | string | '#343a40' | set the color of the loader background. (Ex: hex or color) | | objectbg | string | '#999793' | set the color of the loader object background. (Ex: hex or color) | | opacity | number | 80 | set the opacity of background. | | speed | number | 2 | animation speed in seconds. | | disableScrolling | boolean | false | disable page scrolling when preloader is open. |

Author

© Gonçalo Bastos