1.0.1 • Published 5 years ago

mil-pulse-spinner v1.0.1

Weekly downloads
10
License
-
Repository
github
Last release
5 years ago

\<mil-pulse-spinner>

'mil-pulse-spinner' is a loading spinner that exposes a pulse animation. It uses lit-element and can be used with any webcomponent.

Demo: https://stackblitz.com/edit/mil-pulse-spinner-example?file=index.js

Usage

Install from npm

npm install --save mil-pulse-spinner

Import to your webcomponent

import "mil-pulse-spinner";

Add to html

<mil-pulse-spinner id="myMilPulseSpinner"></mil-pulse-spinner>

Remove element when needed

When loading is complete, simply remove the element.

const spinner = this.shadowRoot.getElementById("myMilPulseSpinner");

targetElement.addEventListener("loaded", function() {
  spinner.remove();
});

Styling

Use customs CSS properties for styling.

CSS propertyDefault
--color1Black
--color2White
--width40px
--height40px