Crystal
Components

CrystalTextReveal

Staggered text sequence animation with inline items, exits, and highlights.

CrystalTextReveal animates a sequence of text lines with GSAP, supporting inline items that appear on the same line, exit animations that clear previous text, and highlight styling for emphasis.

Import

import { CrystalTextReveal } from '@artasce/crystal-ui';

Usage

<CrystalTextReveal
  sequence={[
    { text: 'hello', hold: 0.8, exit: true },
    { text: "i'm cai", hold: 0.8, exit: true },
    { text: 'i architect' },
    { text: 'intelligent systems', inline: true, highlight: true },
  ]}
/>

Props

CrystalTextReveal Props

TokenVariableValue
sequence
TextSequenceItem[](required)
onComplete
() => void
delay
number0.5
fontSize
'sm' | 'md' | 'lg' | 'xl' | 'hero''hero'
color
'default' | 'amethyst''amethyst'
respectReducedMotion
booleantrue
className
string

Values update live with theme changes. Click any row to copy the CSS variable.

TextSequenceItem

FieldTypeDefaultDescription
textstring(required)Text to display
durationnumber0.5Animation duration (seconds)
holdnumberTime to hold before next item
exitbooleanAnimate out before next item
inlinebooleanAppear on same line as previous
highlightbooleanApply highlight/accent styling
classNamestringPer-item CSS classes

Examples

Hero Introduction

<CrystalTextReveal
  fontSize="hero"
  color="amethyst"
  sequence={[
    { text: 'We Build', hold: 0.5, exit: true },
    { text: 'Intelligent', highlight: true },
    { text: 'Systems', inline: true },
  ]}
  onComplete={() => setShowContent(true)}
/>

Smaller Reveal

<CrystalTextReveal
  fontSize="lg"
  delay={1}
  sequence={[
    { text: 'Step 1: Discovery' },
    { text: 'Step 2: Architecture', inline: false },
    { text: 'Step 3: Delivery', inline: false },
  ]}
/>