Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultScrollColour Shift Sections
Circle Fill ButtonBrowse all 182Lagging Column Grid
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Colour Shift Sections

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • ScrollTrigger

Setup

npm i gsapregisterPlugin(ScrollTrigger)

More like this

  • Card
  • Grid
  • ScrollTrigger

Features.

  • One long section split into zones; as each zone's top crosses the middle of the screen, the whole section's background and text ease to its colour pair
  • Works in both directions, with no hard edges between zones
  • Dark, ash and brand pairs ship as CSS variables; each zone picks one with a class
  • Each zone holds a title and a grid of 3:4 picture cards with light text on a dark scrim
  • Three columns, then two (last card centred) below 992px, then one below 768px
  • Respects prefers-reduced-motion: the colours change instantly instead of easing

How to get it right.

Make each zone tall enough

A colour change lands when a zone's top reaches the middle of the screen. Zones about a screen tall or more give each colour time to settle before the next one arrives.

Pick pairs with contrast

Every zone sets a background and a text colour. Titles take the text colour; card text always stays light on its scrim. Check each title against its background.

Keep the change readable

0.8s with expo.out feels like the page breathing. Drop data-au-duration towards 0.3 for a snappier switch, or 0 for a hard cut.

Match the pictures to the mood

Grouping pictures by colour (deep blue, pale grey, warm colour) makes each zone's shift feel earned.

Card copy is optional

Cards ship with a title. For a line under it, add <span class="czn_card-copy"> after .czn_card-title (copy in React).

Variations.

  • Hard cut — data-au-duration="0"
  • Slow wash — data-au-duration="1.6"
  • Two zones — dark and ash only, for a quieter shift
  • Your palette — override --czn-dark-bg … --czn-brand-fg on the section

Where it fits.

  • Portfolios — projects grouped by type, each with its own mood
  • Product ranges — a colourway per zone
  • Editorial — chapters of a long read
  • Event or venue pages — day, evening and night programmes

Frequently asked.

Copy a [data-czn-zone] block, give it czn_zone--dark, --ash or --brand, and change its title and cards. The script finds every zone itself.

Add a class that sets --czn-zone-bg and --czn-zone-fg, e.g. .czn_zone--stone { --czn-zone-bg: #ccc5b9; --czn-zone-fg: #252422; }, and put it on a zone.

The first zone counts as active from the moment it enters the screen, so the section opens in its colours.

No. Only the section's own background and text change. Give the page around it the first zone's colour for a seamless start.

No. It reacts to scroll position, so it works with native scrolling and with any smooth-scroll library that updates ScrollTrigger.

Related components.

NewPro

Arc Collage Hero

Scroll

Pro

Rising Card on Scroll

Scroll

Pro

Outline Paint Reveal

Scroll