Simulate Youtube Top Loading Indicator With TopLoader.js

Category: Javascript , Loading | October 31, 2019
Authorloukaspd
Last UpdateOctober 31, 2019
LicenseMIT
Views851 views
Simulate Youtube Top Loading Indicator With TopLoader.js

TopLoader.js is a small JavaScript component that lets you create an animated top progress bar to simulate the Youtube-style loading indicator.

How to use it:

1. Install the package and import the TopLoader.js as a component.

# NPM
$ npm install top-loader-service --save
import TopLoaderService from 'top-loader-service';

2. Import the necessary stylesheet.

import 'top-loader-service/TopLoaderService.css'
<!-- or -->
<link href="TopLoaderService.css" rel="stylesheet">

3. Start the top loading indicator.

TopLoaderService.start();

4. Stop the loading indicator when needed.

TopLoaderService.stop();

You Might Be Interested In:


Leave a Reply