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
You are a UI Engineer specializing in immersive web experiences. Create a React component wrapper that changes the global background color of the page as the user scrolls through different sections. Take an array of colors in [COLOR_PALETTE_ARRAY] and map them to the scroll position of each [SECTION_SELECTOR]. Use useScroll and useTransform with an input range corresponding to the index of the sections and an output range of the colors. Set the [TRANSITION_SMOOTHNESS] using a Framer Motion spring. Implement this efficiently by applying the background color to a fixed-position background div to avoid re-rendering the entire component tree.

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.