• Stars
    star
    10,208
  • Rank 3,404 (Top 0.07 %)
  • Language
    CSS
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Delightful, performance-focused pure css loading animations.

Loaders.css

Delightful and performance-focused pure css loading animations.

What is this?

See the demo

A collection of loading animations written entirely in css. Each animation is limited to a small subset of css properties in order to avoid expensive painting and layout calculations.

I've posted links below to some fantastic articles that go into this in a lot more detail.

Install

bower install loaders.css
npm i --save loaders.css

Usage

Standard
  • Include loaders.min.css
  • Create an element and add the animation class (e.g. <div class="loader-inner ball-pulse"></div>)
  • Insert the appropriate number of <div>s into that element
jQuery (optional)
  • Include loaders.min.css, jQuery, and loaders.css.js
  • Create an element and add the animation class (e.g. <div class="loader-inner ball-pulse"></div>)
  • loaders.js is a simple helper to inject the correct number of div elements for each animation
  • To initialise loaders that are added after page load select the div and call loaders on them (e.g. $('.loader-inner').loaders())
  • Enjoy

Customising

Changing the background color

Add styles to the correct child div elements

.ball-grid-pulse > div {
  background-color: orange;
}
Changing the loader size

Use a 2D Scale transform

.loader-small .loader-inner {
  transform: scale(0.5, 0.5);
}

Browser support

Check the can I use tables. All recent versions of the major browsers are supported and it has support back to IE9.

Note: The loaders aren't run through autoprefixer, see this issue.

IE 11 Firefox 36 Chrome 41 Safari 8
✔ ✔ ✔ ✔

Contributing

Pull requests are welcome! Create another file in src/animations and load it in src/loader.scss.

In a separate tab run gulp --require coffee-script/register. Open demo/demo.html in a browser to see your animation running.

Further research

Inspired by loaders.css

A few other folks have taken loaders and ported them elsewhere.

Licence

The MIT License (MIT)

Copyright (c) 2016 Connor Atherton

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

walkway

An easy way to animate SVG elements.
JavaScript
4,371
star
2

rb-readline

Pure-Ruby Readline Implementation
Ruby
248
star
3

typeout

Type and retype text in the browser.
JavaScript
86
star
4

OctoPanel

A simple, clean and responsive theme for Octopress.
CSS
57
star
5

TypeWriter

Simulate typing on a page.
JavaScript
48
star
6

uiscript

A web UI manipulation language for humans
JavaScript
30
star
7

git-identify

Easily configure different git identities on the same machine
Shell
13
star
8

Progress

Progress.js is an online tool that allows students to visualise and forecast academic grades
JavaScript
13
star
9

Spotlight.js

A lightweight JavaScript library to bring attention to any page element
JavaScript
8
star
10

meteor-foundation-5

An atmosphere smart package for foundation 5.
CSS
7
star
11

headway

Easy ansi style string parsing for the terminal
JavaScript
5
star
12

angular-hackathon

An opinionated node boilerplate for angular applications.
JavaScript
4
star
13

laravel-auth-skeleton

A boilerplate Laravel application that implements basic authentication.
PHP
4
star
14

Sweet

A sweet VPN desktop client
JavaScript
4
star
15

js-structures

A playground for creating interesting data structures in JavaScript.
JavaScript
3
star
16

node-todo

JavaScript
3
star
17

checks

Standalone type checks for JavaScript
JavaScript
2
star
18

learning-rust

A Rust playground.
Rust
2
star
19

ancee

ansi style color codes
JavaScript
2
star
20

owlci

A continuous integration tool for diffing visual layouts.
Ruby
2
star
21

shell-helpers

A repo full of helpful shell code snippets
Shell
2
star
22

grader

Meteor application to forecast grades
JavaScript
1
star
23

oliver

Ask for permissions in the browser.
JavaScript
1
star
24

Konami

A tiny library for responding to the konami code
JavaScript
1
star
25

tasks

A small terminal task manager
JavaScript
1
star
26

godaddy-api

Ruby
1
star
27

go-task-manager

A simple terminal task manager written in Go
Go
1
star
28

strgen

A ruby string generator
Ruby
1
star
29

geeny

A tiny, go arg parser
Go
1
star
30

fcount

Recursively count file types.
JavaScript
1
star
31

clong

Collaborative pong in a web browser
JavaScript
1
star