Necessarily Precedes Mischief
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »


1.2.10 • Public • Published

SCSS Spinners and Loaders

Uses-CSS     Built-With-Love


Circle-CI   Semantic-Release

Bundle-Phobia   NPM-DM



You can view the spinners right now at

Getting Started

Using this project 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)

To import only a specific spinner:

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

The example above would only import balls spinner.

Overriding variables

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

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

Task Description
$spinner-color Sets the primary color of the spinner
$spinner-accent Sets the secondary or accent color of the spinner
$spinner-size Sets the size of the spinner

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


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


npm i scss-spinners

DownloadsWeekly Downloads






Unpacked Size

53.3 kB

Total Files


Last publish


  • avatar