All Projects → joseluisq → Prelodr

joseluisq / Prelodr

Licence: mit
A simple Material preloader inspired by Google Inbox.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Prelodr

Reacom
ReaCOM has got a lot of tools to use and is related to component object model
Stars: ✭ 57 (-16.18%)
Mutual labels:  component
Selectivity
Modular and light-weight selection library
Stars: ✭ 1,113 (+1536.76%)
Mutual labels:  component
Vue Clock2
vue clock component 😀
Stars: ✭ 67 (-1.47%)
Mutual labels:  component
Region Picker
A region picker based on Vue and ElementUI.
Stars: ✭ 59 (-13.24%)
Mutual labels:  component
Dzhtmltext
Delphi and Lazarus HTML Label component
Stars: ✭ 60 (-11.76%)
Mutual labels:  component
Class Loader
[DEPRECATED] The ClassLoader component provides tools to autoload your classes and cache their locations for performance.
Stars: ✭ 1,131 (+1563.24%)
Mutual labels:  component
Checkview
An animated toggling Plus/Check button for Android
Stars: ✭ 56 (-17.65%)
Mutual labels:  component
React Native X Bar
🎩 A flexible, lightweight bar component for common UI patterns in React Native
Stars: ✭ 68 (+0%)
Mutual labels:  component
Stf Vue Select
stf vue select - most flexible and customized select
Stars: ✭ 61 (-10.29%)
Mutual labels:  component
Horsey
🐴 Progressive and customizable autocomplete component
Stars: ✭ 1,146 (+1585.29%)
Mutual labels:  component
Vue Seamless Scroll
🔰A simple, seamless scrolling for Vue.js vue无缝滚动component
Stars: ✭ 1,106 (+1526.47%)
Mutual labels:  component
Redemo
react demo component
Stars: ✭ 60 (-11.76%)
Mutual labels:  component
Vue Virtual Keyboard
⌨️ Vue Virtual Keyboard
Stars: ✭ 65 (-4.41%)
Mutual labels:  component
Any Ui
❄️ 一个移动端组件库
Stars: ✭ 58 (-14.71%)
Mutual labels:  component
Made With Love
🚀 An experimental project which demonstrates an Angular Package which contains Angular Elements and Schematics
Stars: ✭ 67 (-1.47%)
Mutual labels:  component
Apprun
AppRun is a JavaScript library for developing high-performance and reliable web applications using the elm inspired architecture, events and components.
Stars: ✭ 1,087 (+1498.53%)
Mutual labels:  component
React Pin Field
📟 React component for entering PIN codes.
Stars: ✭ 63 (-7.35%)
Mutual labels:  component
Vue Autonumeric
A Vue.js component that wraps the awesome autoNumeric input formatter library
Stars: ✭ 68 (+0%)
Mutual labels:  component
Security Http
Security provides an infrastructure for sophisticated authorization systems, which makes it possible to easily separate the actual authorization logic from so called user providers that hold the users credentials. It is inspired by the Java Spring framework.
Stars: ✭ 1,146 (+1585.29%)
Mutual labels:  component
Daggraph
Dagger dependency graph generator for Android Developers
Stars: ✭ 1,140 (+1576.47%)
Mutual labels:  component

Prelodr Build Status Coverage Status js-standard-style CDNJS version

A simple Material preloader inspired by Google Inbox.

Prelodr preview

🎉 View demo on Codepen

For React style check out react-prelodr.

Install

Yarn

yarn add prelodr --dev

NPM

npm install prelodr --save-dev

CDN

The UMD and style files are also available on unpkg:

<link href="https://unpkg.com/prelodr/dist/prelodr.min.css">
<script src="https://unpkg.com/prelodr/dist/prelodr.min.js"></script>

Available on JSDelivr

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/prelodr.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/prelodr.min.js"></script>

Available on cdnjs

<link href="https://cdnjs.cloudflare.com/ajax/libs/prelodr/2.1.1/prelodr.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prelodr/2.1.1/prelodr.min.js"></script>

You can use the library via window.prelodr.

Usage

const pre = require('prelodr')()

// a) Show prelodr
pre.show('Loading...')

// b) Hide prelodr
pre.hide()

Async and chaining support

show(fn) method supports an optional (fn) callback function.

const pre = Prelodr()

// Step 1
pre
  .show('Initializing...')
  .hide(done => {
    console.log(' 1 second delay... ')
    setTimeout(() => {
      done()
    }, 1000)
  })

// Step 2
pre
  .show('Processing...')
  .hide(done => {
    console.log(' 2 seconds delay... ')
    setTimeout(() => {
      done()
    }, 3000)
  })

// Step 3
pre
  .show('Closing...')
  .hide()

Options

  • container : Container element to append the preloader.
  • zIndex : zindex style value.
  • auto : If it's true preloader shows automaticatly. Default false
  • duration : Timing for show and hide transition.
  • text: Default showing text.
  • prefixClass : Prefix class for prelodr. Default is prelodr class.

Methods

Prelodr.show(text)

Show the prelodr.

  • text {String} : Text for prelodr.

Prelodr.hide(fn)

Hide the prelodr.

  • fn {Function} : (Optional) Callback function

Prelodr.setPrefixClass(prefix)

  • options {String} : Set the prefix class.

Prelodr.setDuration(miliseconds)

  • miliseconds {Number} : Set the transition timing

Prelodr.setZIndex(zindex)

  • zindex {Number} : Set the zindex style value.

Prelodr.getElement()

Return the {HTMLElement} object.

Events

Prelodr.on('shown', fn)

Event when prelodr is shown.

Prelodr.on('hidden', fn)

Event when prelodr is hidden.

Changelog

Check out the changelog

Contributions

If you would like to contribute pull requests and issues will be welcome! Feature requests are welcome too. Please before sending some feature requests make sure provide as much detail and context as possible.

License

MIT license

© 2017 José Luis Quintana

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].