If your Framer Motion text disappears after the animation ends, check whether it sits over a positioned background. Upgrading from version 10 to 14 can make that text fade in and then drop behind the background. It happened to the links on my portfolio. Type checks, the build and my layout comparison all passed, and the fix was one CSS class.
What I saw
I hadn't worked on this portfolio since February, so I had Claude Code move it to Bun and update every dependency, including Next 16, Tailwind 4 and framer-motion 14. Type checks passed. The build passed. It also compared every section's size and position against the old build on desktop, tablet and mobile, and they matched exactly.
Then I scrolled down my own site. In the contact section, the links appeared and were gone a moment later. They couldn't be clicked either.


The links still took up the same space, which is why the layout comparison saw nothing wrong. They were painted underneath the background.
Why the text ended up behind the video
The section looked like this. The background is positioned, and the content wrapper next to it isn't:
<motion.section className="relative ...">
<ContactBackground /> {/* absolute inset-0: a video and two gradients */}
<div className="mx-auto flex w-[90%] flex-col ..."> {/* no position set */}
<AnimatedBody text="Send me an email" />
</div>
</motion.section>Positioned elements paint above non-positioned ones, so by that rule the background should always have covered the text. It only stayed visible because framer-motion's animated elements formed their own stacking contexts, which any element with opacity below 1 or a transform other than none does.
My animations end at y: "0em", and the two versions treat that value differently.
Version 10.6.1 compares the raw value against the default with a strict check:
// Otherwise check to see if this is a default transform
if (value !== (valueType.default || 0))
transformIsNone = false;The string "0em" is not the number 0, so the transform never counted as empty. The element kept translateY(0em) translateZ(0) after the animation ended, and with it the stacking context that held it above the video. My layout had been relying on that by accident.
Version 14.10.1, the one I upgraded to, parses the value first:
const isDefaultTransform = (key, value) =>
(typeof value === "number" ? value : parseFloat(value)) ===
(key.startsWith("scale") ? 1 : 0);parseFloat("0em") is 0, so the transform is left out and the style becomes none. That matches what I saw. While the text animated, its opacity and transform kept it on top. When the animation finished, both reached their resting values, the stacking context went away, and the text dropped behind the video.
The newer behavior is reasonable, since 0em really is no movement. I only compared these two versions, so I can't tell you which release changed it.
One detail helped confirm this. The big CONTACT heading in the same section never disappeared, and its wrapper already had relative on it.
The fix
One class, so the content stops relying on animation side effects:
- <div className="mx-auto flex w-[90%] flex-col ...">
+ <div className="relative mx-auto flex w-[90%] flex-col ...">The content comes after the background in the DOM, so once both are positioned it paints on top.
A check that catches this
Size and position can't catch a painting bug, but the browser can tell you what is really on top at any point. Scroll the links into view, wait for animations to finish, then run this in the console:
const covered = [...document.querySelectorAll("#contact a")].filter((link) => {
const box = link.getBoundingClientRect();
const top = document.elementFromPoint(
box.x + box.width / 2,
box.y + box.height / 2,
);
return !link.contains(top);
});
console.log(covered);Before the fix, this kind of check reported that the top element at each link was one of the background's gradient divs. Now that list is empty.
I run a version of this in Playwright across four screen sizes after upgrades that touch CSS or animation. If you're upgrading from framer-motion 10, it's also worth searching for animations that end on string zeros such as "0em" or "0px", then checking what sits behind those elements.
