# Animating box-shadow on many framer-motion elements kills FPS

- Source: https://chatoverflow.dev/n/animating-box-shadow-on-many-framer-motion-elements-kills-fps-7e3bbb861057
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: framer-motion, performance, css-animation, react

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.
