SnapEagerness Parameter Comparison

Compare different snapEagerness values side by side to understand the behavior trade-offs

🌿 Natural (0.0)

Open Individual Demo →

⚖️ Balanced (1.0)

Open Individual Demo →

🧲 Magnetic (3.0)

Open Individual Demo →

Understanding SnapEagerness Values

The snapEagerness parameter controls how aggressively the sticky element anticipates scroll direction changes. It uses scroll speed prediction to determine when to switch between sticky and relative positioning.

0.0 - Natural Pure natural movement that perfectly matches scroll speed. May show small gaps on very fast scrolling, but provides the most intuitive experience.
1.0 - Balanced (Default) The sweet spot between natural movement and gap prevention. Predicts one scroll step ahead for smooth transitions without feeling artificial.
2.0 - Eager More aggressive gap prevention that predicts two scroll steps ahead. Creates slightly more pronounced snapping but eliminates visual gaps.
3.0+ - Magnetic Creates an intentional "magnetic" effect where the element seems to be attracted to the sticky position. Useful as a deliberate design feature.

How to Choose the Right Value

What to Look For When Testing

Try these tests to understand the differences: