Coder Social home page Coder Social logo

claercio / spinthatshit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matejkustec/spinthatshit

0.0 2.0 0.0 25 KB

A set of SCSS mixins for single element loaders and spinners

Home Page: https://matejkustec.github.io/SpinThatShit/

License: MIT License

JavaScript 4.69% CSS 95.31%

spinthatshit's Introduction

SpinThatShit

A set of SCSS mixins for single element loaders and spinners

View examples

Getting started

  • 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

Parameter Type Default value
$size Numbers $loader-size
$height Numbers $loader-height
$color Color $loader-color
$duration Time $loader-animation-duration
$gap Numbers $loader-gap
$align Keyword null

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.

spinthatshit's People

Contributors

matejkustec avatar

Watchers

James Cloos avatar Claércio Santos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.