All Projects → rcaferati → web-animation-club

rcaferati / web-animation-club

Licence: other
CSS controlled animations with transitionEnd, onTransitionEnd, animationend, onAnimationEnd events and frame throwing. Tiny javascript library with cross-browser methods to handle css animation/transition callbacks and event loop frame throwing. 📚🖥️📱

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to web-animation-club

Vivify
Vivify is free CSS animation library.
Stars: ✭ 1,651 (+3075%)
Mutual labels:  css3, css-animations, animation-library
Micron
a [μ] microInteraction library built with CSS Animations and controlled by JavaScript Power
Stars: ✭ 2,252 (+4230.77%)
Mutual labels:  css3, css-animations, javascript-library
You Need To Know Css
💄CSS tricks for web developers~
Stars: ✭ 3,777 (+7163.46%)
Mutual labels:  css3, css-animations, css-transitions
Nodeppt
This is probably the best web presentation tool so far!
Stars: ✭ 9,589 (+18340.38%)
Mutual labels:  css3, javascript-library
Jde
Linux desktop environment built with HTML5, CSS, JavaScript and Python.
Stars: ✭ 591 (+1036.54%)
Mutual labels:  css3, javascript-library
Morphist
A simple, high-performance and cross-browser jQuery slider / slideshow / carousel plugin for child objects powered by Animate.css.
Stars: ✭ 60 (+15.38%)
Mutual labels:  css3, css-animations
react-awesome-loaders
🚀 High quality, super responsive and completely customisable Loading Animations to insert into your website with single line of code.
Stars: ✭ 146 (+180.77%)
Mutual labels:  css3, animation-library
Scenejs
🎬 Scene.js is JavaScript & CSS timeline-based animation library
Stars: ✭ 2,019 (+3782.69%)
Mutual labels:  css3, javascript-animation-library
React Liquidswipe
🚀 Smooth Liquid Swipe Animation to transition between different components.
Stars: ✭ 245 (+371.15%)
Mutual labels:  css3, animation-library
CSS-Collection
A wide variety of animations done using only CSS
Stars: ✭ 44 (-15.38%)
Mutual labels:  css3, css-animations
DevHelpBox
we are creating this community so that other developers can get benefits of it.
Stars: ✭ 35 (-32.69%)
Mutual labels:  css3, javascript-library
aprendendo-css
Vários desenhos feitos com CSS e SCSS (e as vezes um pouco de JavaScript)
Stars: ✭ 56 (+7.69%)
Mutual labels:  css3, css-animations
Agilejs
AgileJS - The Css3 Creation Engine 🍖🌭🍔
Stars: ✭ 489 (+840.38%)
Mutual labels:  css3, css-animations
Morphext
A simple, high-performance and cross-browser jQuery rotating / carousel plugin for text phrases powered by Animate.css.
Stars: ✭ 384 (+638.46%)
Mutual labels:  css3, css-animations
Pure Css3 Animated Border
Pure CSS3 animated border for all html element.
Stars: ✭ 63 (+21.15%)
Mutual labels:  css3, css-animations
Landing-Page-Animation
Landing page animation made using CSS
Stars: ✭ 45 (-13.46%)
Mutual labels:  css3, css-animations
learn-css-animation
Learn CSS animation with fun. It is simple, easy to use, and fun to learn.
Stars: ✭ 54 (+3.85%)
Mutual labels:  css3, css-animations
css-collection
🧙‍♂️ CSS芸人への道(CSSでつくったもの集)| I want to be CSS Magician
Stars: ✭ 82 (+57.69%)
Mutual labels:  css3, css-animations
Dynamic.css
🚀 Awesome Library of CSS3 animations 🎉
Stars: ✭ 38 (-26.92%)
Mutual labels:  css3, animation-library
hexa
Awesome Css Animation. The documentation =>
Stars: ✭ 32 (-38.46%)
Mutual labels:  css3, css-animations

web-animation-club

Travis NPM

Tiny ~0.8kb javascript library with cross-browser methods to handle CSS ontransitionend and onanimationend events. AKA css animation and transition callbacks.

Quick usage

Quick usage example of the onceTransitionEnd wac method.

wac.onceTransitionEnd(element).then(function(event) {
  // ... do something
});

Live Demo

Access the demo at https://webanimation.club

react-awesome-slider demo

Installation

From the dist file

Just load directly in your HTML the web-animation-club.min.js javascript file located on the dist folder.

... 
<script src="https://webanimation.club/library/0.1.2/web-animation-club.min.js"></script>
...

NPM Registry

From the NPM registry using npm or yarn just install the web-animation-club package.

npm install --save web-animation-club

or

yarn add --save web-animation-club

Basic Usage

For all the following examples please consider the following HTML markup.

<style>
  .animated {
    transition: transform 0.4s linear;
  }
  .move {
    transform: translateX(100px);
  }
</style>
<div class="container">
  <div class="box"></div>
</div>

HTML with ES5

<script src="/path/to/web-animation-club.min.js"></script>
<script>
  var box = document.querySelector('.box');
  
  box.classList.add('animated');
  box.classList.add('move');
  
  onceTransitionEnd(box).then(function(event) {
    // ... do something
  });
</script>

Javascript ES6

  import { onceTransitionEnd } from 'web-animation-club';

  const element = document.querySelector('.box');
  
  // here we're just simulating the addition of a class with some animation/transition
  element.classList.add('animated');
  element.classList.add('move');
  
  // if you are using the transition css property
  onceTransitionEnd(element).then((event) => {
    // ... do something
  });

WAC methods

onceTransitionEnd(element, options)

  • element <[HTML element]> html element on which the transition is happening
  • options <[object]>
    • tolerance <[integer]> used in case of pseudo-element animations
    • property <[string]> animated property to check before calling the callback

onceAnimationEnd(element, options)

  • element <[HTML element]> html element on which the transition is happening
  • options <[object]>
    • tolerance <[integer]> used in case of pseudo-element animations
    • property <[string]> animated property to check before calling the callback

beforeFutureCssLayout(frames, callback)

  • frames <[integer]> Number of frames to skip
  • callback <[function]> function called after the skipped frames

beforeNextCssLayout(callback)

  • callback <[function]> function called after the skipped frame

Author

Rafael Caferati

License

MIT. Copyright (c) 2018 Rafael Caferati.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].