1.0.4 • Published 7 years ago

spinthatshit v1.0.4

Weekly downloads
1,875
License
MIT
Repository
github
Last release
7 years ago

SpinThatShit

A set of SCSS mixins for single element loaders and spinners

View examples

Getting started

npm install spinthatshit
bower install SpinThatShit

OR

  • Clone or download repo
  • Include src folder to your project

Usage

Create a div with your custom loader class name:

<div class="your-loader"></div>

In your custom class name include a mixin of a loader. All loaders are ordered by number, so you will have to take a look in examples folder for your loader number.

.your-loader {
    @include loader01;
}

In _variables.scss there are default settings for loaders

$loader-color: #0052ec;
$loader-size: 56px;
$loader-height: 20px;
$loader-border-size: 8px;
$loader-gap: 12px;
$loader-animation-duration: 1s;

But you can also change these default settings, while your're including loader

@include loader09($size: 10px, $height: 48px, $gap: 8px, $duration: 1s, $align: middle);

All loaders can be also aligned to center, while including loader with parameter $align, $align: center is just for x axis, $align: middle is for both axis.

PARAMETERS

ParameterTypeDefault value
$sizeNumber$loader-size
$heightNumber$loader-height
$border-sizeNumber$loader-border-size
$colorColor$loader-color
$durationTime$loader-animation-duration
$gapNumber$loader-gap
$alignKeywordnull

NOTE: Some loaders may not need $height and $gap parameters.

Performance issues

Some loaders which are using box-shadow for animation may be causing high cpu usage and lag, I'll need to look into more details and fix it, if it's possible.

Contributing

If you have some new idea for loader/spinner or you want to fix loader just let me know.

1.0.4

7 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago