graphics

TextFadeReplace

Cycles through a list of phrases, crossfading one into the next in place so the swap never shifts the layout. Calm house-eased crossfade for rotating taglines and value props.

$ npx ondajs add text-fade-replace

TextFadeReplace

Cycles through a list of phrases, crossfading one into the next in place. Both the outgoing and incoming phrase are layered (with an invisible spacer reserving height) so the swap never shifts the layout. A calm HOUSE_EASE crossfade — for rotating taglines, value props, or "X, then Y, then Z" beats.

Props

PropTypeDefaultNotes
phrasesstring[]["ship","render","repeat"]Phrases, in order.
intervalnumber45Frames each phrase holds.
crossfadenumber12Frames of crossfade between phrases.
delaynumber0Frames before the first phrase.
loopbooleantrueLoop after the last phrase.
colorstring#F2F2F4Text color.
fontSize / sizenumber / role96Explicit px or canvas-aware role.
fontFamily, fontWeight, letterSpacing, lineHeight, aligndisplay defaultsTypography vocabulary.
placementregion or {x,y,anchor}Canvas placement.

Usage

TSX
import { TextFadeReplace } from './components/onda/text-fade-replace/TextFadeReplace';

export const TaglineScene = () => (
  <TextFadeReplace phrases={['Plan', 'Render', 'Ship']} placement="center" />
);