GitXplorerGitXplorer
b

ember-animatable

public
6 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
1ad7197de532428fdaf1f6e0cec579942ee4fca8

Released v2.0.0

bbekzod committed 6 years ago
Unverified
73b93ee0983ad7bb2c5f633078ad6a8389fb9a2c

update deps

bbekzod committed 6 years ago
Unverified
f57bf8b1595cdc750aa09fb25f7179d30ca7ebe2

Released v1.0.0

bbekzod committed 9 years ago
Unverified
71f0de2fa86dfe2dc3d625a8a39dceeb7f9769e6

Released v0.1.8

bbekzod committed 9 years ago
Verified
55f215b6d6cba614b1e5de05648fc3a87b768787

Update README.md

bbekzod committed 7 years ago
Unverified
1d0d216becdffeee2d21f01ac65a50d927f11b90

Create README.md

bbekzod committed 8 years ago

README

The README file for this repository.

ember-animatable Ember Observer Score npm version

Ember Mixin which provides convenient way using animate.css animations in components. Demo

Mixin Method

  • animate(animationType:string, animationTarget:string): promise
    animationType: animation type bounce, full list can be found here
    animationTarget: css selector .class-name (optional if not provided component is the target)
    returns: promise which is resolved when animation finishes

Standalone Function

  • animate(animationTarget:string/element, animationType:string): promise
    animationTarget: css selector .class-name animationType: animation type bounce, full list can be found here
    returns: promise which is resolved when animation finishes

Import as mixin

import Ember from 'ember';
import AnimatableMixin from 'ember-animatable';

export default Ember.Component.extend(AnimatableMixin, {
    click() {
      let anim = this.animate('pulse', '.animation-target');
      anim.then(function() {
        console.log('animation complete')
      });
    }
});

Import as function

import Ember from 'ember';
import { animate } from 'ember-animatable';

export default Ember.Component.extend({
    click() {
      let anim = animate('.animation-target', 'pulse');
      anim.then(function() {
        console.log('animation complete')
      });
    }
});

Use what you need

By default addon will import all css animations provided by animate.css, but usually you don't need all css animations, so you can specify which once to import in app config.

 let app = new EmberApp(defaults, {
  'ember-animatable': {
    include: ['pulse', 'bounceIn'] // pulse and bounceIn animation will be imported
  }
});

Installation

  ember install ember-animatable