Home  >  Article  >  Web Front-end  >  Framer Motion | Introduction - Part 1

Framer Motion | Introduction - Part 1

王林
王林Original
2024-07-18 12:43:22925browse

What is it?

Framer Motion is a library that allows you to easily animate in React applications. Used to add animation effects such as transitions and dragging.

Created by Who?

Created by Framer company. Framer is a company that specifically develops user interface (UI) design and prototyping tools.

How to Install?

Framer supports React 18 and above versions. Run the following command to install via npm.

npm install framer-motion

The Framer motion library does not have any dependencies and you can start applying it with a single package.

Image description

Image description

Framer motion has shown that it has gained serious appreciation from its users, with approximately 3.4 million weekly downloads on npm and 22700 stars on github, as of today (10.07.2024).

Usage

You can import the motion object from the framer-motion library within the desired component and add a motion component to any html or svg element. .

import { motion } from "framer-motion";

export default function App() {
  return <motion.div />;
}

The above is the detailed content of Framer Motion | Introduction - Part 1. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn