See the component page for more information.
Easy to use API inspired on Animate.css animations.
function animStuff(){
var anim = Animations.bounce(event.target, { delay: 100 }); // Animations.animation.(target or [targets], options)
anim.play(); //see the full list of available animations below
}You can even merge animations like this
function animStuff(){
var anim = Animations.merge(Animations.bounce(event.target, { delay: 100 }), Animations.fadeIn(event.target)); // Animations.merge.(arguments) even CoreAnimationGroup objects
anim.play(); // anim is CoreAnimationGroup object
}There is also a hide property-attribute in some animations, that stands for show/hide element on animation play/finish.
It simply sets/removes attribute hidden. By default it's set to true.
It's required, because when your element's opacity reaches 0 your element is not currently hidden and can be clicked etc. That's why we have hide attribute.
If you want to add same animation to the parent's children. For example you have:
<div>
<button></button>
<button></button>
</div>And you want to add every button to div's animation target. Simply set div's animation property applyToChildren to true.
You can also specify options in HTML attributes anim-animation-option
<custom-el anim-bounce-duration="500" anim-bounce-iterations="2" onclick="animStuff();">
<!-- Some cool stuff here -->
</custom-el>Attention Seekers
bounceflashpulserotateClockwiserotateCounterClockwiserubberBandshakeswingtadawobble
Bouncing Entrances
bounceInbounceInDownbounceInUpbounceInLeftbounceInRight
Bouncing Exits
bounceOutbounceOutDownbounceOutUpbounceOutLeftbounceOutRight
Fade Entrances
fadeInfadeInDownfadeInDownBigfadeInLeftfadeInLeftBigfadeInRightfadeInRightBigfadeInUpfadeInUpBig
Fade Exits
fadeOutfadeOutDownfadeOutDownBigfadeOutLeftfadeOutLeftBigfadeOutRightfadeOutRightBigfadeOutUpfadeOutUpBig
Flippers
flipflipInXflipInYflipOutXflipOutY
LightSpeed
lightSpeedInRightlightSpeedOutRightlightSpeedInLeftlightSpeedOutLeft
Rotate Entrance
rotateInrotateInDownLeftrotateInDownRightrotateInUpLeftrotateInUpRight
Rotate Exits
rotateOutrotateOutDownLeftrotateOutDownRightrotateOutUpLeftrotateOutUpRight
Sliding Entrances
slideInDownslideInLeftslideInRightslideInUp
Sliding Exits
slideOutDownslideOutLeftslideOutRightslideOutUp
Specials
hingerollInrollOut
Zoom Entrance
zoomInzoomInDownzoomInLeftzoomInRightzoomInUp
Zoom Exits
zoomOutzoomOutDownzoomOutLeftzoomOutRightzoomOutUp