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

Expert Prompt for Background Color Morphing Scroll Sections

Customize the variables below to instantly engineer your prompt.

Required Variables

background-color-morphing-scroll-sections.txt
Act as a Creative UI Engineer specializing in immersive web experiences. Create a highly optimized React Higher-Order Component (HOC) or layout wrapper that dynamically interpolates the global background color of the page as the user scrolls through designated content sections. Ingest an array of hex codes in [COLOR_PALETTE_ARRAY] and map them proportionally to the scroll intersection progress of each targeted [SECTION_SELECTOR]. Utilize `useScroll` combined with a complex `useTransform` featuring an input range corresponding to the calculated viewport offsets of the sections, and an output range of the defined colors. Dictate the [TRANSITION_SMOOTHNESS] by passing the transformed value through a Framer Motion spring with low stiffness. To guarantee 60fps performance and avoid catastrophic React re-renders of the entire DOM tree, apply the resulting dynamic background color strictly to a solitary, `position: fixed`, `z-index: -1` background `motion.div`.

Example Text Output

"The AI will generate a higher-order component or wrapper that smoothly blends the site's background color as different content blocks enter the viewport."

More Web Components Prompts

View all →

Frequently Asked Questions

What is the "Expert Prompt for Background Color Morphing Scroll Sections" prompt used for?

The AI will generate a higher-order component or wrapper that smoothly blends the site's background color as different content blocks enter the viewport.

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.