The background shadow animation shown in the Build microinteractions around mouse movement example on Webflow’s Interactions feature page can be achieved using Webflow’s built-in interactions — no custom code is required.
There are two ways to simulate the shadow/highlight:
Method A: Animate box-shadow properties
Under the interaction, create a new Mouse X/Y move action.
Add a Box Shadow style transformation that updates the X and Y offset dynamically based on the mouse position.
Set the Origin of the element appropriately if needed.
Method B: Move a light overlay
Create a radial gradient div (e.g., a white semi-transparent circle) behind or above the element.
Animate its position using move transforms based on the cursor position.
This method simulates how a light source changes dynamically with mouse movement.
You can fully replicate the mouse-based background shadow effect from the Webflow interaction demo using Webflow’s native interactions—no custom code is needed. Use Mouse Move over Element triggers with box-shadow changes or positioned overlays to achieve the animated light/shadow look.