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

scss-spinners

v2.1.3

Published

SCSS Spinners and Loaders based on webkul's csspin

Downloads

315

Readme

Introduction

Demo

You can view the spinners right now at https://rinminase.github.io/scss-spinners/

Getting Started

Using this package as CSS from a CDN

  1. You can use JSDelivr CDN and place it on your main HTML page

    <head>
      ...
      <link rel="stylesheet" href=https://cdn.jsdelivr.net/npm/scss-spinners />
    </head>
  2. Usage is as simple as

    <div class="spinner round"></div>

Using this package as SCSS

  1. Install the package from npm

    npm install scss-spinners
  2. Import the main stylesheet of this project to the main stylesheet of your project

    @import "./node_modules/scss-spinners/spinners"

    If you are using a Webpack loader (e.g. React and Angular) you can shorten it to:

    @import "~scss-spinners/spinners";

    As ~ resolves the import from a node_module path.

  3. Usage is as simple as

    <div class="spinner round"></div>

Specific imports (Tree-shaking) in SCSS

To import only a specific spinner:

@import "~scss-spinners/components/balls";

The example above would only import balls spinner.

Overriding variables in SCSS

Variables is located at /node_modules/scss-spinners/variables.scss.

The table below lists the possible variables which can be overriden.

Spinners

| Task | Description | | --------------------- | ------------------------------------------------------------------------- | | $spinner-color | Sets the primary color of the spinner (default: #28A745) | | $spinner-accent | Sets the secondary or accent color of the spinner (default: #71C585) | | $spinner-size | Sets the size of the spinner (default: 60px) |

Loader

| Task | Description | | --------------------- | ------------------------------------------------------------------------- | | $loader-color | Sets the primary color of the loader (default: #28A745) | | $loader-background | Sets the secondary or background color of the loader (default: #EDEDED) | | $loader-size | Sets the size of the loader (default: 3px) | | $loader-speed | Sets the speed of the loader in seconds (default: 2s) |

To override, on the stylesheet before importing spinners.scss:

$spinner-color: blue;
$spinner-size: 10px;

@import "~scss-spinners/spinners";

Building the project as CSS

  1. Download the latest Node version. This is marked as <version number> Current. Install it on your machine.

  2. (Optional) Download Yarn. This is a faster package manager than the default npm one.

  3. Clone the project

    git clone https://github.com/RinMinase/scss-spinners.git
    cd scss-spinners
  4. Install the dependencies then run the project

    npm install
    npm build

    Note: If you have installed Yarn, run these instead:

    yarn install
    yarn build
  5. Navigate to the dist/ folder in the root directory. Inside this folder is your css file for usage.

Project Structure

.
├── spinners.scss         # Main stylesheet
├── globals.scss          # Globals stylesheet
├── index.html            # Demo page
├── .circleci/            # CircleCI deployment
├── components/           # Specific spinner stylesheets
└── dist/                 # Stylesheets built to CSS

How the structure works?

  • spinner.scss imports all specific spinner stylesheets
  • _{spinner}.scss imports variables.scss, globals.scss and contains styles for the specific spinner

Project tasks

Task automation is based on Yarn scripts or NPM scripts.

| Task | Description | | -------------------------------- | --------------------------------------------------------------- | | npm start or yarn start | Builds the scss files to dist/ to a css file | | npm build or yarn build | Builds the scss files to dist/ to a minified css file | | npm run watch or yarn watch | Builds the scss files to dist/ with file watching on changes |

Built with

Credits

This is based from Webkul's CSSPIN made in SCSS for projects looking for SCSS spinners or loaders.