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

aurelia-spinner

v1.0.12

Published

Spinner custom attribute for aurelia applications.

Downloads

16

Readme

Aurelia custom attribute to add awesome spinners based on http://tobiasahlin.com/spinkit/

demo https://ne0guille-aurelia-spinner.azurewebsites.net/

Installation

npm install aurelia-spinner --save

Plugin Setup The only required attribute its the spinner view.

import { SpinnerConfig, spinnerViews } from 'aurelia-spinner';

const spinnerConfig: SpinnerConfig = {
    spinner: spinnerViews.circle,
    useBackgroundOverlay: false,
    blockerClass: 'my-default-overlay-background',
    color: 'black'
};
 
aurelia.use.plugin(PLATFORM.moduleName('aurelia-spinner', spinnerConfig))

Configuration Options You can see all of the spinners available in the demo site.

spinnerViews = {
 chasingDots
 circle,
 cubeGrid,
 doubleBounce,
 fadingCircle,
 foldingCube,
 pulse,
 rotatingPlane,
 threeBounce,
 wanderingCubes,
 wave
}

add style in webpack if you use te spinner-block class you need to add this file.

'aurelia-spinner/dist/styles.css'

css: 'spinkit/css/spinkit.css;
sass: 'spinkit/scss/spinkit.scss;

or you can import a single spinner file under the spinner folder.

css: 'spinkit/css/spinners/9-cube-grid.css';
sass: 'spinkit/scss/spinners/9-cube-grid.scss';

Usage Usage with default configurations

  
 <div class="container">
   <div spinner="show.bind: showVM"></div>
 </div>

 <div spinner="show.bind: showVM; view.bind: viewVM; block: true">
 </div>
 
 Currently, you need to wrap your custom element or code.
 You can specify the container element adding the spinner-container class first the children node. Also you can add the 'aurelia-spinner' class on the parent node to render the spinner component on top of your code.

 The background overlay class will be added on the container / wrapper node.

 <section spinner="show.bind: showVM">  
   <!-- spinner will be inserted here -->    
   <div class="spinner-container">  <!-- wrapper div -->  <!-- background ovelay will be added here -->
     <!-- my-custom-code -->
   </div>
 </section>

 <section class="aurelia-spinner">
 <!-- spinner will be inserted here -->     
   <div spinner="show.bind: showVM"> <!-- wrapper div -->  <!-- background ovelay will be added here -->   
   <!-- my-custom-code -->
   </div>
 </section>

 <section>
   <div spinner="show.bind: showVM" class="playground__spinner"> <!-- spinner-container class will be added here --> 
     <!-- spinner will be inserted here -->    
     stuff
   </div>
 </section>

Bindables

  Bindable used to show or hide the spinner.
  show: boolean = false; 

  Just if you want to override the previous configured view.
  view: string = undefined;

  Used to display an overlay blocker with the spinner. You can change the style setting the class in the default configurarion object or overriding the css of the spinner-block class.
  block: boolean = false; 

  Type a color name or an hexa code.
  color: string = #333;

  example: 
  
  <div spinner="show.bind: showVM; block: true; view: viewVM; color: white"></div>

Dependencies "spinkit": https://github.com/tobiasahlin/SpinKit