Animate UI Like a Pro with Framer Motion
Animation isn’t decoration. It’s communication.
Topics covered:

Lazar Kapsarov
Building high-performing SaaS, e-commerce & landing pages with Next.js, React & TypeScript. Helping businesses create digital experiences that convert.

The truth is… motion done wrong is a gimmick. But motion done right? It guides attention, reduces friction, and makes your UI feel alive..
That’s where Framer Motion comes in. It gives you motion primitives, transitions, and accessibility-first patterns — without writing spaghetti CSS or hacking random JS.
This post shows how to use it like a pro.
Motion Primitives: The Building Blocks
Framer Motion is built on primitives. Simple pieces that combine into complex behaviours.
The essentials: *motion.div → your animated wrapper. *AnimatePresence → handles mount/unmount animations. *Variants → reusable sets of animation states (think: hidden, visible, exit). *Gestures → drag, hover, tap built right in. With just these, you can cover 90% of real-world cases. From fade-ins and slide-ups, to drag-to-reorder lists and micro-interactions.
Why it works: primitives give you power without bloat.
Transitions: Timing Is Everything
Animation isn’t about the what. It’s about the how long.
Framer Motion makes transitions simple:
*Duration: how fast it runs. *Easing: how natural it feels. *Spring physics: realistic motion without math headaches.
Example:
<motion.div
initial={{ opacity: 0, y: 40 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.4, ease: "easeOut" }}
>
Smooth entrance.
</motion.div>
Want bounce? Switch to type: "spring" and let the physics engine handle it. Timing = emotion. Fast feels snappy. Slow feels calm. Bounce feels playful. Use timing like a designer uses colour. With intent.
Best Practices: Keep It Smooth, Keep It Accessible
Motion can’t just “look cool.” It must serve the experience.
Rules I live by: 1.Keep it short → 200–500ms for most transitions. 2.Match the brand → soft spring for playful, sharp ease-out for professional. 3.Don’t block interactions → animations should never trap the user. 4.Respect accessibility → honour prefers-reduced-motion. Framer Motion supports this natively. 5.Guide attention → animate what matters (CTA, modal, key flows). Skip the fluff. Smooth is invisible. Clunky is unforgettable — for the wrong reasons.
Performance & Accessibility Together
Animation can kill performance if you’re careless.
Here’s how I avoid that: *Stick to transform and opacity. Avoid animating width/height/top/left. *Keep bundles lean → Framer Motion is tree-shakeable. Import only what you need. *Test motion on mobile → if it lags there, it fails. *Monitor with Web Vitals → INP (interaction latency) must stay <200ms. Accessibility check: *Use reducedMotion: "user" to honour OS settings. *Don’t animate essential info (error messages, form feedback). *Provide keyboard-friendly focus states even when motion is disabled. Performance + accessibility = trust. And trust sells.
Case Study: Motion That Converts
On one e-commerce project, we added: *Smooth product image transitions. *Checkout steps sliding in with context. *Micro-interactions on buttons.
Before → After: *Checkout abandon: 72% → 56% (↓16pp). *Conversion rate: 1.4% → 2.2% (↑0.8pp). *User feedback: “It just feels easier.” That’s the impact of motion done right.
Final Word
Animation isn’t fluff. It’s flow.
With Framer Motion, you’re not guessing. You’re using a system that balances power, performance, and accessibility.
Use primitives to build clean. Use transitions to set the mood. Use best practices to keep it smooth.
The truth is… motion is your secret weapon. Get it wrong, and users get dizzy. Get it right, and your product feels effortless.
Animate UI like a pro. Fast. Clean. Effective. Animate UI like a pro. Fast. Clean. Effective.