Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@motionone/animation

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@motionone/animation

A semi-polyfill WAAPI animation.

  • 10.6.0-rc.3
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
decreased by-0.58%
Maintainers
1
Weekly downloads
 
Created

What is @motionone/animation?

The @motionone/animation package is a powerful library for creating animations in web applications. It provides a simple yet flexible API for animating elements with both JavaScript and CSS properties, allowing developers to create smooth, performant animations with ease.

What are @motionone/animation's main functionalities?

Animating CSS properties

This feature allows you to animate CSS properties of an element. The code sample demonstrates how to fade in an element by animating its opacity from 0 to 1 over 1 second.

animate(element, { opacity: [0, 1] }, { duration: 1 })

Animating SVG attributes

With this feature, you can animate SVG attributes. The example shows how to animate the strokeDashoffset attribute from 100 to 0, which can be used to create a drawing effect for SVG paths.

animate(element, { strokeDashoffset: [100, 0] }, { duration: 1 })

Timeline animations

This feature enables the creation of complex animations that involve multiple elements and animations in a sequence or in parallel. The code sample illustrates how to fade in one element while simultaneously moving another element horizontally, with the second animation starting 0.5 seconds later.

timeline([[elementA, { opacity: [0, 1] }, { duration: 1 }], [elementB, { x: [0, 100] }, { duration: 1, delay: 0.5 }]])

Other packages similar to @motionone/animation

FAQs

Package last updated on 22 Jan 2022

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