How to use css-animator - 2 common examples

To help you get started, we’ve selected a few css-animator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fabiandev / css-animator / docs / builder.main.ts View on Github external
import { AnimationBuilder } from 'css-animator/builder';

const element = document.getElementById('animate');
const showButton = document.getElementById('showButton');
const shakeButton = document.getElementById('shakeButton');
const hideButton = document.getElementById('hideButton');

const animator = new AnimationBuilder();

animator
  .setType('fadeInUp')
  .setDelay(100)
  .show(element);

showButton.onclick = () => {
  showButton.setAttribute('disabled', '');

  animator
    .setType('fadeInUp')
    .setDuration(1000)
    .show(element)
    .then(() => {
      hideButton.removeAttribute('disabled');
      shakeButton.removeAttribute('disabled');
github fabiandev / angular-quiz-app / src / js / bootstrap.ts View on Github external
import * as Hammer from 'hammerjs';
(window as any).Hammer = Hammer;

import { AnimationBuilder } from 'css-animator/builder';
import 'materialize-css';
import 'angular2-materialize';

AnimationBuilder.defaults.fixed = true;

css-animator

Animate elements using CSS classes with support for Angular 2+

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis