
Text Fill Animation
Text
A phrase-level text animation for hero headlines, product claims, campaign lines, and brand statements where the message needs motion without becoming a full carousel.
Depth Flip turns a static headline into a controlled sequence of short statements.
The effect works by transitioning one phrase into another through a layered flip motion. The outgoing line compresses, shifts, or folds through depth while the next phrase resolves into place. It gives the text a spatial handoff without needing a large 3D scene, heavy WebGL layer, or full-screen route transition.
Use Depth Flip when a page needs to rotate between a small set of connected statements: product positioning, campaign claims, launch lines, value propositions, feature labels, or short brand phrases. The page job is compression: say more than one thing in the same visual space without making the visitor read a dense block.
The production risk is over-rotation. A flipping headline can sharpen a hero, but it can also weaken the message if the copy changes too quickly, loops forever, or hides the most important claim. The strongest version uses a small set of phrases that belong to the same argument and lets each one settle long enough to be read.
import DepthFlipText from "@/components/effects/depth-flip-text"; const page = () => { return ( <> <DepthFlipText/> </> )} export default pageA developer-tool landing page can use Depth Flip in the hero to rotate between three related claims: speed, source ownership, and production readiness. Each phrase gets its moment, then hands off to the next without forcing a bulky paragraph above the CTA.
The outcome is density with control. The page can say more than one thing without making the first screen feel crowded.
A studio homepage can use the same effect for a short brand sequence where each phrase defines one part of the promise: craft, motion, and commercial clarity.
Not for body copy, long sentences, legal text, documentation, form labels, error messages, pricing details, or instructions.
Not for unrelated phrase sets. If every flip introduces a new topic, the effect becomes a slot machine for positioning.
Not for headlines where one strong sentence would do the job better.
Keep the phrase count small, animate transform and opacity, avoid layout reads during every transition, and clean up timers or animation instances when the component unmounts. Reserve the headline container so phrase changes do not shift surrounding content.
Avoid running multiple Depth Flip instances in the same viewport unless the page is deliberately built around kinetic typography.
Expose the active phrase clearly and avoid making assistive technology read decorative duplicate layers. If the phrase sequence communicates essential meaning, provide a stable text equivalent or ensure each phrase remains understandable without relying on motion.
On mobile, reduce depth distance, scale compression, and transition speed if the effect feels cramped. For reduced motion, show a static preferred phrase or switch phrases instantly without perspective movement.
| Prop | Type | Default | Description |
|---|---|---|---|
textColor | string | #ffffff | Text color for both the current and incoming phrase. |
loop | boolean | true | Restarts the phrase sequence after the last entry. |
holdDuration | number | 0.4 | Delay before each phrase begins its flip transition. |
transitionDuration | number | 1.4 | Duration of the flip animation. |
charStagger | number | 0.02 | Delay between each character beginning its motion. |
useOpacityTransition | boolean | false | Fades outgoing and incoming characters during the flip. |
Depth Flip is a React text animation that transitions between short phrases using a compressed perspective or flip-style motion.
Use it when a hero, campaign section, or product intro needs to rotate between a small set of related claims in the same visual space.
Two to four phrases usually work best. More than that can dilute the message and make the headline feel like an endless loop.
No. Keep the phrases short. The effect works best when each phrase can be read instantly before the next one appears.
Expose the meaningful phrase once, hide decorative duplicate layers where needed, and avoid making the animation the only way to understand the message.
Show a static phrase, display the full phrase set as normal text, or switch instantly without perspective movement, scale compression, or repeated flipping.
Need a custom effect? Tell us what to create.