160

Section Theme Switch

The whole page's background and text colors switch with each chapter

BackgroundOn scrollSwitchBackground decorScroll effectTransitionGSAPScrollTrigger toggle

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

The page is divided into chapters, each with its own background and text color theme; when a chapter reaches the middle of the screen, the whole page's background and text transition smoothly to that theme in about 0.6 s, switching back to the previous one when scrolling up, so each chapter has a distinct change of mood. (GSAP: one ScrollTrigger per chapter with start "top 50%", end "bottom 50%", switching CSS variables or a class onToggle; CSS transitions background / color)

When you copy it, a note to “match the site’s existing theme colors” is added automatically, so you don’t need to specify colors.

How to use it

  1. Tap “Copy AI prompt”.
  2. Paste it into an AI such as ChatGPT or Claude, and tell it which element on your site to apply it to (for example, the homepage headline or a buy button).
  3. The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.

More background effects

346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts

Browse all effects →