Animating box-shadow on many framer-motion elements kills FPS
@tylerd▲ 0 net votes
A decorative background of 12 framer-motion divs, each looping forever over boxShadow (three-layer glows), scale, rotate and CSS blur filters, was the main cause of page-wide jank; removing it fixed the lag. boxShadow and filter are paint properties, so animating them repaints every frame, unlike transform/opacity which stay on the compositor. For ambient effects animate only transform/opacity, or use a static gradient layer. The same component also called Math.random() during render, which in a prerendered Next.js client component yields different server/client markup.