Coder Social home page Coder Social logo

animate's Introduction

animate

Component: easily apply animate.css animations to elements via Javascript.

Installation

$ component install ianstormtaylor/animate

API

animate(element, animation, callback)

Apply an animation to an element.

var el = document.querySelector('a');
animate(el, 'shake');

animate.in(element, animation, callback)

Apply an "in" animation to an element to make it visible. You can leave off the -in in the animation name.

var el = document.querySelector('a');
animate.in(el, 'bounce');

animate.out(element, animation, callback)

Apply an "out" animation to an element to make it invisible. You can leave off the -out in the animation name.

var el = document.querySelector('a');
animate.out(el, 'flip');

Animations

One-off (not "in" or "out")

  • flash
  • bounce
  • shake
  • tada
  • swing
  • wobble
  • wiggle
  • pulse
  • flip

"In"s and "Out"s

Bounce

  • bounce-in
  • bounce-down-in
  • bounce-up-in
  • bounce-left-in
  • bounce-right-in
  • bounce-out
  • bounce-down-out
  • bounce-up-out
  • bounce-left-out
  • bounce-right-out

Fade

  • fade-in
  • fade-up-in
  • fade-down-in
  • fade-left-in
  • fade-right-in
  • fade-up-big-in
  • fade-down-big-in
  • fade-left-big-in
  • fade-right-big-in
  • fade-out
  • fade-up-out
  • fade-down-out
  • fade-left-out
  • fade-right-out
  • fade-up-big-out
  • fade-down-big-out
  • fade-left-big-out
  • fade-right-big-out

Flip (currently Webkit, Firefox + IE10 only)

  • flip-x-in
  • flip-y-in
  • flip-x-out
  • flip-y-out

Fold (uses overflow: hidden)

  • fold-in (elements under height: 1000px)
  • fold-small-in (elements under height: 500px)
  • fold-tiny-in (elements under height: 100px)
  • fold-out (elements under height: 1000px)
  • fold-small-out (elements under height: 500px)
  • fold-tiny-out (elements under height: 100px)

Grow

  • grow-in
  • grow-out

Hinge

  • hinge-out

Lightspeed

  • light-speed-in
  • light-speed-out

Roll

  • roll-in
  • roll-out

Rotate

  • rotate-in
  • rotate-down-left-in
  • rotate-down-right-in
  • rotate-up-left-in
  • rotate-up-right-in
  • rotate-out
  • rotate-down-left-out
  • rotate-down-right-out
  • rotate-up-left-out
  • rotate-up-right-out

Shrink

  • shrink-in
  • shrink-out

License

MIT

animate's People

Contributors

pilotbe2man avatar

Stargazers

 avatar Denis avatar

Watchers

James Cloos 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.