1. Home
  2. /
  3. Framer-motion
  4. /
  5. Simple Framer Motion Animation

Simple Framer Motion Animation - Framer-motion Typing CST Test

Loading…

Simple Framer Motion Animation — Framer-motion Code

A basic Framer Motion example animating a div element scaling up and rotating on render.

# framer_motion/demo/App.jsx
import React from 'react';
import { motion } from 'framer-motion';

function App() {
	return (
		<motion.div
		style={{ width: 100, height: 100, backgroundColor: 'blue' }}
		animate={{ scale: 1.5, rotate: 360 }}
		duration={2}
		/>
	);
}

export default App;

Framer-motion Language Guide

Framer Motion is a production-ready animation library for React, designed to create smooth, declarative animations, gestures, and transitions in web applications.

Primary Use Cases

  • ▸Page and component transitions
  • ▸Interactive UI animations and micro-interactions
  • ▸Drag-and-drop gestures
  • ▸Animated modals, menus, and notifications
  • ▸Shared element transitions and layout animations

Notable Features

  • ▸Declarative React animation API
  • ▸Gestures: drag, hover, tap, pan, scroll
  • ▸Spring-based physics animations
  • ▸Layout animations and shared layout transitions
  • ▸Exit/enter animations with AnimatePresence

Origin & Creator

Framer Motion was developed by Framer B.V., the same team behind the Framer prototyping tool (2018-present).

Industrial Note

Framer Motion is used extensively in interactive web apps, SaaS dashboards, landing pages, micro-interactions, and complex React UI/UX animations.

More Framer-motion Typing Exercises

Framer Motion Fade InFramer Motion Slide InFramer Motion BounceFramer Motion RotateFramer Motion Scale Up DownFramer Motion Hover EffectFramer Motion DragFramer Motion Stagger ChildrenFramer Motion Keyframes

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher