New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

automatos

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

automatos

A CSS Animation controller

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Automatos

A CSS Animation library

Automatos is a small Javascript library for controlling CSS Animations.

Requires Promises

Usage

automatos({
    el: '.demo',
    name: 'fadeIn',
    duration: 1000,
});

Options

{
    el: DOM node or selector string,
    name: string,
    duration: integer,
    iterations: integer or string,
    direction: string,
    delay: string,
    fillMode: string,
    timingFunc: string
}

e.g.

{
    el: document.querySelector('.demo'),
    name: 'bounce',
    duration: 1000,
    iterations: 'infinite',
    direction: 'reverse',
    delay: '1s',
    fillMode: 'forwards',
    timingFunc: 'ease-in-out'
}

Methods

.after

Calls a callback after the specified milliseconds.

e.g.

[...]
.after(100, function () {
    console.log('calls after 100ms');
})

.then

Calls a callback when the animation is complete.

e.g.

[...]
.then(function () {
   console.log(this.el, 'has finished animating');
});

.play

Sets the play-state to running.

e.g.

[...]
.play()

.pause

Sets the play-state to paused.

e.g.

[...]
.pause()

.stop

Stops the animation and emits the animation stopped event.

e.g.

[...]
.stop()

.promise

A reference to the promise attached to the animation-end event.

e.g.

[...]
.promise.then(function () {
    // called when the animation is over
});

// or

var a1 = automatos(//put options here);
var a2 = automatos(//put options here);

Promise.all([a1.promise, a2.promise]).then(function () {
    // called when all animations are over
});

Keywords

FAQs

Package last updated on 07 Mar 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc