







Variants are the feature that changes how you write animation, and most people skip them. Instead of giving every child its own animate prop, you name states on a parent, say hidden and visible, and children inherit them by name. Add staggerChildren to the parent transition and a list animates in sequence with no timers and no index maths. The payoff grows with the size of the component: a navigation menu with eight items becomes two objects and a loop rather than eight hand-tuned delays.
Layout animation is the other feature that is hard to reproduce by hand. Add the layout prop and Motion measures the element before and after a change, then animates the difference using a transform, which is why it stays smooth even though width and position moved. Pair it with layoutId on two different elements and you get the shared element transition people associate with expanding cards and image lightboxes. The caveat is that layout animation reads from the DOM, so it is measurably more expensive than a plain opacity fade. Use it where the movement carries meaning, not on every card in a grid of forty.
For gestures, whileHover, whileTap, whileInView and drag cover almost everything without state management, and they clean up after themselves when the pointer leaves, which is the part hand-rolled hover state usually gets wrong. Two things to remember: whileHover does nothing useful on touch devices, so never hide information behind it, and whileTap should be subtle, around a 0.97 scale, because a large tap animation reads as lag rather than feedback. If a control is a real button, keep it a button element so keyboard and screen reader behaviour survives.
Spring versus tween is a question about what the movement represents. Springs are defined by stiffness, damping and mass rather than a duration, and they suit anything the user initiated, since the slight overshoot reads as physical. Tweens have a fixed duration and easing curve, which is what you want for entrances and fades, or for anything that has to finish in step with something else. A common mistake is a bouncy spring on a page load animation, where the overshoot makes content look like it is settling into place late. Springs also complicate orchestration, because you cannot promise a spring will be done in 300 milliseconds.
The performance rule is short. Animating transform and opacity is cheap because the compositor can do it without touching layout or paint. Animating width, height, top, left, margin or box-shadow forces the browser to recalculate on every frame, and box-shadow in particular is a known frame killer at large blur radii. Substitutions exist for most cases: scale instead of width, x instead of left, y instead of top, and a pre-rendered shadow layer whose opacity you animate instead of the shadow itself. Test on a throttled CPU in devtools rather than on your laptop, because the machine you build on is the least representative device in the chain.
Named animation states defined once on a parent and referenced by string on its children. They let a whole subtree animate together, and combined with staggerChildren they sequence a list without writing per-item delays.
Use a spring for movement the user caused, like dragging or opening a panel, because the overshoot feels physical. Use a tween with a fixed duration for entrances and fades, or whenever the animation has to end at a predictable time.
Anything that changes layout or paint: width, height, top, left, margin, padding and box-shadow. Stick to transform and opacity, which run on the compositor, and reach for scale or Motion's layout prop when you genuinely need a size change.
Motion snapshots the element's box before and after a render, then animates from the old position to the new one using a transform instead of animating layout properties directly. Add layoutId to two elements and it will transition between them as though they were the same object.
It can, if you animate large distances or hide content behind hover. Use the useReducedMotion hook to shorten or remove animation when the operating system asks for it, and keep interactive elements as real buttons and links so focus order and screen reader output stay intact.
Here's what some of our users have to say about Aceternity UI.

amazing to see @calcom find its way into proper templates 🥳 excited to be powering the next thousands of startups and their demo calls!

Stumbled upon ui.aceternity.com today and my mind is blown 🤯 The seamless integration of framer-motion, tailwind CSS, and shadcn showcases a masterclass in UI design. 🚀 Kudos to @mannupaaji for creating such an innovative and inspirational resource for devs! #UI #nextjs

Have you heard of Aceternity UI? It's packed with various animated components that are ready to copy and paste! Mind-blowing stuff... 🤯 Click here ➡️ ui.aceternity.com #framermotion #nextjs #tailwindcss #techinnovation

ui.aceternity.com So well done. And its bloody free 🤯🤯 Phenomenal work by @mannupaaji

So happy to see @mannupaaji work being recognised 🥹🤌🏻♥️ His work is literally a treasure trove for devs 💎

Aceternity UI has some of the best components for designing landing pages I've ever seen. If you're struggling with figuring out what animations to use. Check it out. Thank me later 😉. ui.aceternity.com
See what the best YouTubers are saying about Aceternity UI.







ceternity UI
Access an ever-growing collection of premium, meticulously crafted templates and Component Blocks.
© 2026 Aceternity Labs LLC. All Rights Reserved.