
Mask Text Reveal
Text
A chromatic headline effect for portfolios, campaign pages, AI products, cyber brands, and experimental landing pages where the type should briefly distort without losing the message.
Chromatic Text turns a headline into an optical signal.
The effect stacks two coloured copies (amber and orange by default) behind a white headline inside a 150vh section with a sticky viewport. As you scroll, each layer is pushed vertically by an amount tied to scroll speed and direction, with the back layers travelling further and slightly offset sideways, so the type smears into a chromatic, aberration-like trail. About 0.2 seconds after scrolling stops, the layers ease back into one crisp headline. There is no blur. The headline text is fixed in the component (“Scroll to See Chromatic Effect”), so change it in the source; colours, font size, weight and background are props.
Use Chromatic Text when the headline should feel technical, optical, or slightly charged. It works for AI pages, developer tools, cyber interfaces, music and culture campaigns, creative portfolios, and launch sections where the type can carry a controlled distortion.
The page job is attention with restraint. The visitor should notice the chromatic shift, understand the headline, and keep moving. If the effect makes the words harder to read than the message deserves, the animation has become the main character.
import ChromaticText from "@/components/effects/chromatic-text"; const page = () => { return ( <main> <ChromaticText baseTextColor="#ffffff" firstTextColor="#FFB200" secondTextColor="#EB5B00" fontSize={10} fontWeight={500} backgroundColor="#111111" /> </main> );}; export default page;A cyber or AI product page can place Chromatic Text just below the hero to give a claim a controlled signal-distortion effect. As visitors scroll past, the headline stretches into coloured trails in proportion to their scroll speed, then snaps back into readable copy when they pause.
The outcome is tension. The page feels technical and alive without sacrificing the clarity of the claim.
Not for body copy, legal text, product instructions, forms, dashboards, documentation, pricing copy, or long paragraphs.
Not for accessibility-critical wording or anything the user must read instantly. Distortion is an accent, not a reading strategy.
Limit the effect to one or two sections per page, since each one adds a 150vh scroll section with its own ScrollTrigger. Offsets are capped and only transforms are animated, and the GSAP context is reverted on unmount. Keep layer colours close enough to the base that the trails feel sharp rather than smeared.
The headline is exposed once: the two decorative colour layers are aria-hidden. The base layer is a paragraph, so wrap or adapt it if the page needs it as a real heading. At 1024px wide and below the layers travel less. With reduced motion, only the static white headline is rendered, with no colour layers or movement.
| Prop | Type | Default | Description |
|---|---|---|---|
baseTextColor | string | #ffffff | Color of the front/base text layer. |
firstTextColor | string | #FFB200 | Color of the red chromatic depth layer. |
secondTextColor | string | #EB5B00 | Color of the blue chromatic depth layer. |
fontSize | number | 10 | Font size in vw units shared by every text layer. |
fontWeight | number | 500 | Font weight shared by every text layer. |
backgroundColor | string | #111111 | Background color for the scroll section. |
Chromatic Text is a React scroll effect that stacks two coloured copies behind a large headline and pulls them apart vertically in proportion to scroll speed, creating a chromatic-aberration style trail that settles back when scrolling stops.
Use it for short hero headlines, campaign statements, and technical brand moments where optical distortion supports the visual identity.
No. Use it on large, short text only. Body copy should remain stable, readable, and boring in the best possible way.
The component already marks both decorative colour layers aria-hidden, so the text is read once. Keep the headline short, check contrast between the base colour and background, and remember reduced motion shows only the static base text.
The text renders as real HTML, so it can be indexed. Note that it is a paragraph rather than a heading and the wording is fixed in the component, so edit it in the source and use a proper heading elsewhere if the section needs one.
When prefers-reduced-motion is on, the colour layers aren’t rendered and no ScrollTrigger is created, so the white headline sits still and readable in its section.
Need a custom effect? Tell us what to create.