Blenra LogoBlenra
Optimized for: Gemini / ChatGPT / Claude
#React

Advanced Prompt for Magnetic Scroll Snapping Logic

Customize the variables below to instantly engineer your prompt.

Required Variables

magnetic-scroll-snapping-framer-motion.txt
Act as a Senior UI Physics Engineer. Develop a custom, highly programmatic scroll snapping engine in React utilizing Framer Motion. Bypassing native, rigid CSS `scroll-snap`, utilize `useScroll` and `useAnimate` (or imperative window scrolling) to engineer a fluid 'magnetic' physics effect. The scroll position must be forcefully but smoothly pulled toward the exact pixel offsets defined in [SNAP_POINTS_ARRAY] the moment the user's scroll velocity hits zero near them. Calculate the gravitational pull proximity based on the [SNAP_STRENGTH] integer. Support movement along the [DIRECTION] axis (vertical or horizontal). Crucially, execute the [CALLBACK_FUNCTION] precisely when a snap animation settles to update the React application state (e.g., updating a current slide index or URL hash). The logic must rigorously account for native trackpad momentum and absolutely must not hijack or break standard browser accessibility scrolling behaviors.

Example Text Output

"The AI will provide a complex React hook and wrapper that programmatically 'snaps' the scroll position to specific elements with custom easing and callbacks."

More Web Components Prompts

View all →

Frequently Asked Questions

What is the "Advanced Prompt for Magnetic Scroll Snapping Logic" prompt used for?

The AI will provide a complex React hook and wrapper that programmatically 'snaps' the scroll position to specific elements with custom easing and callbacks.

Which AI tools work with this prompt?

This prompt is optimized for Gemini / ChatGPT / Claude, but works great with ChatGPT, Claude, Gemini, and other large language models. Simply copy it and paste it into your preferred AI tool.

How do I customize this prompt?

Use the variable fields above to fill in your specific details. The prompt will auto-update as you type, ready to copy instantly.

Is this prompt free?

Yes! All prompts on Blenra are free to copy and use immediately. No account required.