New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tweento

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tweento

Animation library based on CSS animations.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

tweento npm version

Animation library based on CSS animations.

The main idea is to provide a simple API to animating elements with CSS properties that recieve callbacks useful for performing various actions.

Usage

import tweento from 'tweento';

const element = document.querySelector('#element');

const twn = tweento(element, {
  /**
   * Class name or object with valid css properties
   * e.g 'classname' or { width: '300px', color: red }
   *
   * @default null
   */
  to: null,

  /**
   * Defines whether the transition should be started immediately after calling the function
   *
   * @default false
   */
  paused: false,

  onStart: () => {
    console.log('onStart');
  },
  onTransitionStart: () => {
    console.log('onTransitionStart');
  },
  onTransitionEnd: () => {
    console.log('onTransitionEnd');
  },
});

// if `paused: false`, the method is not available
twn.start();

License

MIT © Przemysław Tyczyński

Keywords

animation

FAQs

Package last updated on 15 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts