All Projects β†’ hekigan β†’ Is Loading

hekigan / Is Loading

Licence: mit
Simple library to show visual feedback when loading data or any action that would take time

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Is Loading

busy-load
A flexible loading-mask jQuery-plugin
Stars: ✭ 76 (-67.24%)
Mutual labels:  loader, overlay, loading
Vue Loading Overlay
Vue.js component for full screen loading indicator πŸŒ€
Stars: ✭ 784 (+237.93%)
Mutual labels:  loader, loading, overlay
Loading
loading...ζ­£εœ¨εŠ θ½½δΈ­ηš„εŠ¨η”»ζ•ˆζžœ
Stars: ✭ 36 (-84.48%)
Mutual labels:  loader, loading
Css Spinner
small, elegant pure css spinner for ajax or loading animation
Stars: ✭ 1,013 (+336.64%)
Mutual labels:  loader, loading
React Loading Overlay
Loading overlays with fade, spinner, message support.
Stars: ✭ 218 (-6.03%)
Mutual labels:  loader, overlay
Statefullayout
Android layout to show template for loading, empty, error etc. states
Stars: ✭ 813 (+250.43%)
Mutual labels:  loader, loading
Create Content Loader
✏️ Tool to create your own react-content-loader easily.
Stars: ✭ 937 (+303.88%)
Mutual labels:  loader, loading
React Native Loading Spinner Overlay
πŸ’ˆ React Native loading spinner overlay
Stars: ✭ 1,369 (+490.09%)
Mutual labels:  loading, overlay
Ssspinnerbutton
Forget about typical stereotypic loading, It's time to change. SSSpinnerButton is an elegant button with a diffrent spinner animations.
Stars: ✭ 357 (+53.88%)
Mutual labels:  loader, loading
Vue Loaders
Vue + loaders.css
Stars: ✭ 127 (-45.26%)
Mutual labels:  loader, loading
Eclipseloading
🌞 ζ—₯ι£ŸεŠ θ½½εŠ¨η”»
Stars: ✭ 114 (-50.86%)
Mutual labels:  loader, loading
React Content Loader
βšͺ SVG-Powered component to easily create skeleton loadings.
Stars: ✭ 11,830 (+4999.14%)
Mutual labels:  loader, loading
Whirl
CSS loading animations with minimal effort!
Stars: ✭ 774 (+233.62%)
Mutual labels:  loader, loading
Awloader
AWLoader is a UI Component that allows you to integrate loader that fits your needs within your app.
Stars: ✭ 11 (-95.26%)
Mutual labels:  loader, loading
Ngx Ui Loader
Multiple Loaders / spinners and Progress bar for Angular 5, 6, 7 and 8+
Stars: ✭ 368 (+58.62%)
Mutual labels:  loader, loading
Fiftyshadesof
An elegant context-care loading placeholder for Android
Stars: ✭ 1,110 (+378.45%)
Mutual labels:  loader, loading
Vue Full Loading
Full overlay loading with spinner for Vue
Stars: ✭ 148 (-36.21%)
Mutual labels:  loading, overlay
Loading Bar
Flexible, light weighted and super fast Progress Bar Library
Stars: ✭ 300 (+29.31%)
Mutual labels:  loader, loading
Waitme
jquery plugin for easy creating loading css3/images animations
Stars: ✭ 302 (+30.17%)
Mutual labels:  loader, loading
Mkloader
Beautiful and smooth custom loading views
Stars: ✭ 1,377 (+493.53%)
Mutual labels:  loader, loading

is-loading

Node NPM Travis David Coverage Status Downloads

NPM

Simple script to show visual feedback when loading data or any action that would take time. Vanilla script built with ES2015. Exported as CommonJS, ES2015 and UMD. So it should work everywhere.

Usage

Vanilla javascript

import isLoading from 'is-loading';

Examples and Demo

http://hekigan.github.io/is-loading/

Installation

Install via yarn

yarn add is-loading

or npm

npm install is-loading

configuration

You can pass in extra options as a configuration

Parameters:

By default all modes accept a DOM element as the first parameter, and an option object as the second.

isLoading(targetElement, options);

Full overlay mode is an exception with either no parameters or 1 parameter for the option object.

isLoading(options);
import isLoading from 'is-loading';

βž– targetElement ( DOMElement )
πŸ“ The first parameter is expected to be a DOMElement.
πŸ’‘ example

import isLoading from 'is-loading';

const $elt = document.querySelector('input[type="submit"]');

// Start the script
isLoading($elt).loading();

// Stop the script
isLoading($elt).remove();

βž– options ( Object )
πŸ“ The second parameter is an Object to set options.
πŸ’‘ default

const optionsDefault = {
    'type': 'switch',        // switch | replace | full-overlay | overlay
    'text': 'loading',       // Text to display in the loader
    'disableSource': true,   // true | false
    'disableList': []
};


πŸ’‘ example

import isLoading from 'is-loading';

// Assuming that we have a login form
const $button = document.querySelector('input[type="submit"]');
const $username = document.querySelector('#username');
const $password = document.querySelector('#password');

options = {
    'type': 'switch',        // switch | replace | full-overlay | overlay
    'text': 'login...',      // Text to display in the loader
    'disableSource': true,   // true | false
    'disableList': [$username, $password]
};

// using a variable
const loader = isLoading($button, options);
loader.loading(); // Start the script
loader.remove(); // Stop the script

// no variable
isLoading($button, options).loading(); // Start the script
isLoading($button, options).remove(); // Stop the script

methods

#loading

Show the loader

const loader = isLoading($elt, options);
loader.loading();

// or

isLoading($elt, options).loading();

#remove

Remove the loader

const loader = isLoading($elt, options);
loader.remove();

// or

isLoading($elt, options).remove();

Builds

If you don't use a package manager, you can access is-loading via unpkg (CDN), download the source, or point your package manager to the url.

is-loading is compiled as a collection of CommonJS modules & ES2015 modules for bundlers that support the jsnext:main or module field in package.json (Rollup, Webpack 2)

The is-loading package includes precompiled production and development UMD builds in the dist folder. They can be used directly without a bundler and are thus compatible with many popular JavaScript module loaders and environments. You can drop a UMD build as a <script> tag on your page. The UMD builds make is-loading available as a window.isLoading global variable.

License

The code is available under the MIT license.

Contributing

We are open to contributions, see CONTRIBUTING.md for more info.

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].