Socket
Socket
Sign inDemoInstall

framer-motion

Package Overview
Dependencies
0
Maintainers
39
Versions
1040
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    framer-motion

A simple and powerful JavaScript animation library


Version published
Weekly downloads
3M
decreased by-13.31%
Maintainers
39
Install size
2.21 MB
Created
Weekly downloads
 

Package description

What is framer-motion?

The framer-motion npm package is a popular library for creating animations and transitions in React applications. It provides a powerful and easy-to-use set of tools for animating components, handling gestures, and creating complex motion effects with simple declarative syntax.

What are framer-motion's main functionalities?

Basic Animations

Animate the horizontal position of a component to 100 pixels.

{"<motion.div animate={{ x: 100 }} />"}

Variants

Use variants to define animation states and transition between them.

{"<motion.div variants={variants} initial='hidden' animate='visible' />"}

Gestures

Scale a button up on hover and down on tap.

{"<motion.button whileHover={{ scale: 1.1 }} whileTap={{ scale: 0.9 }} />"}

Drag

Make a component draggable.

{"<motion.div drag />"}

Shared Layout Animations

Animate layout changes between components that share a layoutId.

{"<motion.ul layout><motion.li layoutId='id' /></motion.ul>"}

Exit Animations

Animate the component out when it's removed from the React tree.

{"<motion.div exit={{ opacity: 0 }} />"}

Other packages similar to framer-motion

Keywords

FAQs

Last updated on 19 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc