To make an element change color both when scrolling down and up using a Scroll Into View interaction in Webflow, you need to configure both "Scroll Into View" and "Scroll Out of View" triggers with corresponding actions.
- Select the element you want to animate.
- Go to the Interactions panel (lightning bolt icon).
- Click + Element Trigger and choose “Scroll into view”.
- In the Scroll Into View section, click + Action and set the background color (or text color, etc.) you want when the element scrolls into view.
- Adjust the easing and duration as needed.
- Under the same Scroll Into View trigger, find the Scroll Out of View section.
- Click + Action and set the color you want when the element scrolls out of view (i.e., on scroll up).
- This ensures the color is reverted or changed again when the element leaves the viewport.
3. Optional: Set Interaction to Affect Only the Selected Element
- When adding actions, make sure the target is “Selected Element” unless you want to affect a different one.
4. Double-check Display Thresholds
- In some cases, elements with partial visibility on scroll may not trigger consistently.
- Make sure the element has enough vertical space around it so that Webflow consistently registers the scroll in or out events.
Summary
To make an element change color both when scrolling down and up, apply actions to both the Scroll Into View and Scroll Out of View triggers in the Interactions panel. This symmetrical setup ensures the animation works in both directions.