Skip to content
TrademarkTrademark
Docs
Effects

FadingLettersFx

Updated: April 23, 2025
View on GitHub

FadingLettersFx creates beautiful letter-by-letter animations with precise timing control. Each letter animates independently with customizable delays, creating organic and engaging text reveals.

Animation States

The component supports three distinct animation states: entering, visible, and exiting.

Entering

Letters fade in sequentially with a blur-to-focus effect and scale transformation. Each letter has a calculated delay based on its position in the word and message.

Visible

Letters remain static without animation. Use this state when no animation is active.

Exiting

Letters fade out with blur and scale effects. Each letter has a random exit delay for an organic dissolution effect.

Staggering

Use the messageIdx prop to create staggered animations across multiple messages. Each increment adds 2500ms of base delay.

Custom Styling

FadingLettersFx extends the Once UI Text component, so you can use all Text props including variants, colors, and custom styles.

Timing Configuration

The animation timing follows a precise formula:

  • Message Base Delay: messageIdx × 2500ms
  • Word Delay: wordIdx × 200ms
  • Letter Delay: letterIdx × 40ms
  • Total Entry Delay: Message Base + Word Delay + Letter Delay
  • Exit Delay: Random between 0-400ms per letter

API reference

Type
Default
textrequired
The string to animate, letter by letter.
string—
animationStaterequired
Which phase to play: entering, visible or exiting. The parent drives it.
enteringvisibleexiting
—
messageIdx
Which message this is in a sequence, used to offset the stagger.
number0
…and every FlexProps propinherited—
…and every TextProps propinherited—
variant
TextVariantbody-default-m
onBackground
ColorTokenneutral-strong
children
React.ReactNode—

Usage Tips

  • Use messageIdx for sequential message animations
  • Combine with other effects for complex animations
  • Perfect for hero sections, loading states, and transitions
  • Works with all Once UI Text variants and styling
  • Consider prefers-reduced-motion for accessibility in production
Edit this page on GitHub