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

Framer Motion | Introduction - Part 1

王林
Release: 2024-07-18 12:43:22
Original
973 people have browsed it

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
Copy after login

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 />;
}
Copy after login

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!

source:dev.to
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template