Giter Site home page Giter Site logo

asedadeveloper / animation-kit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dmitrykuzmenkov/animation-kit

0.0 0.0 0.0 82 KB

Animation KIT for you website using CSS

Home Page: http://dmitrykuzmenkov.github.io/animation-kit/

License: MIT License

Shell 0.63% JavaScript 13.88% CSS 84.40% HTML 1.10%

animation-kit's Introduction

#animation-kit Animation KIT for you website using CSS

Notice. Animation KIT is optimzed to use with webpack.

Demo

You can try animations online here: http://dmitrykuzmenkov.github.io/animation-kit/

Installation

Use npm to install package

npm install animation-kit

Usage

First you must require installed npm package and pass to it animated dom element to catch animations.

Import needed less styles for your animation

@import 'node_modules/animation-kit/src/main.less';
@import 'node_modules/animation-kit/src/attention/bounce.less';

Then select DOM element using query selector for example and manage animation on it following this example:

var animation = require('animation-kit');
var element = document.getElementById('my-dom-element');
animation(element)
  .animate('bounce')
  .start(function (e) {
    console.log('Animation started');
  })
  .iteration(function (e) {
    console.log('Animation iteration');
  })
  .end(function (e) {
    console.log('Animation end');
  })
;

Pay attetion you need to require used animated styles too.

Methods

animate(animation, opts)

  • animation - name of animation to perform
  • opts - object with options
    • keep - keep element state after animation is done (default: false)
    • infinite - loop animation infinitly (default: false)

start(cb)

  • cb - callback that will be called after animation start

end(cb)

  • cb - callback that will be called after animation finished

iteration(cb)

  • cb - callback that will be called on animation iteraction

Animation list

All animation has dash (-) notation in names. Keyframes for animation has camelNotationName.
Here is full list of supported CSS animation name that you can use in animate function

  • bounce
  • flash
  • hatch
  • head-shake
  • jello
  • pulse
  • rubber-band
  • shake
  • swing
  • tada
  • wobble
  • boing-in-up
  • boing-out-down
  • bomb-out-left
  • bomb-out-right
  • bounce-in-down
  • bounce-in-left
  • bounce-in-right
  • bounce-in-up
  • bounce-in
  • bounce-out-down
  • bounce-out-left
  • bounce-out-right
  • bounce-out-up-animation
  • bounce-out
  • fade-in-down-big
  • fade-in-down
  • fade-in-left-big
  • fade-in-left
  • fade-in-right-big
  • fade-in-right
  • fade-in-up-big
  • fade-in-up
  • fade-in
  • fade-out-down-big
  • fade-out-down
  • fade-out-left-big
  • fade-out-left
  • fade-out-right-big
  • fade-out-right
  • fade-out-up-big
  • fade-out-up
  • fade-out
  • flip-in-x
  • flip-in-y
  • flip-out-x
  • flip-out-y
  • flip
  • lightspeed-in
  • lightspeed-out
  • rotate-in-down-left
  • rotate-in-down-right
  • rotate-out-down
  • rotate-out-left
  • rotate-out-right
  • rotate-in-up-left
  • rotate-in-up-right
  • rotate-in
  • rotate-out-down-left
  • rotate-out-down-right
  • rotate-out-up-left
  • rotate-out-up
  • rotate-out-up-right
  • rotate-out
  • perspective-in-down
  • perspective-in-left
  • perspective-in-right
  • perspective-in-up
  • perspective-out-down
  • perspective-out-left
  • perspective-out-right
  • perspective-out-up
  • slide-in-down
  • slide-in-left
  • slide-in-right
  • slide-in-up
  • slide-out-down
  • slide-out-left
  • slide-out-right
  • slide-out-up
  • space-in-down
  • space-in-left
  • space-in-right
  • space-in-up
  • space-out-down
  • space-out-left
  • space-out-right
  • space-out-up
  • swash-in
  • swash-out
  • swap
  • twister-in-down
  • twister-in-up
  • hinge
  • hole-out
  • magic
  • puff-in
  • puff-out
  • roll-in
  • roll-out
  • vanish-in
  • vanish-out
  • tin-in-down
  • tin-in-left
  • tin-in-right
  • tin-in-up
  • tin-out-down
  • tin-out-left
  • tin-out-right
  • tin-out-up
  • zoom-in-down
  • zoom-in-left
  • zoom-in-right
  • zoom-in-up
  • zoom-in
  • zoom-out-down
  • zoom-out-left
  • zoom-out-right
  • zoom-out-up
  • zoom-out

animation-kit's People

Contributors

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