Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Text

  • Text
  • Heading
  • SectionHeader
  • Prose
  • Markdown
  • Formula
  • AuroraText
  • LineShadowText
  • AnimatedShinyText
  • AnimatedGradientText
  • WordRotate
  • TypingAnimation
  • SparklesText
  • SplitText
  • BlurText
  • FlipText
  • TextReveal
  • DecryptedText
  • GlitchText
  • CircularText
  • ScrollReveal
  • TrueFocus
  • ASCIIText
  • CurvedLoop
  • FallingText
  • FuzzyText
  • ScrambledText
  • ScrollFloat
  • ScrollVelocity
  • Shuffle
  • TextCursor
  • TextPressure
  • VariableProximity

Code

  • Code
  • CodeBlock
  • Snippet
  • CodeDiff
  • Kbd

SplitText

split-text

Splits text into animatable characters or words for staggered reveal effects.

Usage

Basic usage

Fade in from the bottom word by word, Chinese friendly (divided according to code points).

Make development faster, more stable and more beautiful
tsx
<SplitText text="Make development faster, more stable and more beautiful" className="text-3xl font-bold text-foreground" />

Word-by-word segmentation

splitType="word" Enter word by word according to the blank space, suitable for English slogans.

Build faster with Hulian
tsx
<SplitText
  text="Build faster with Hulian"
  splitType="word"
  from="left"
  className="text-3xl font-bold text-primary"
/>

Approach direction

from controls the entry direction of each segment of displacement: top / bottom / left / right.

Title falling from top to bottom
tsx
<SplitText
  text="Title falling from top to bottom"
  from="top"
  className="text-3xl font-bold text-foreground"
/>

Staggered rhythm and duration

delay adjusts the peak stagger milliseconds of adjacent segments, duration adjusts the duration of a single segment, and makes a slower and more relaxed hero entry.

Slow-tempo stretch entrance
tsx
<SplitText
  text="Slow-tempo stretch entrance"
  delay={90}
  duration={0.8}
  className="text-3xl font-bold text-primary"
/>

When to use

Use SplitText when a title or hero line should enter once with a staggered character- or word-level offset and fade. Use BlurText for a blur-to-clear entrance, ScrollReveal for continuous word progress tied to scrolling, or Heading for static headings.

Import

ts
import { SplitText } from "@hulianui/ui"

Props

NameTypeDefaultDescription
text *string-Text to animate.
splitType"char" | "word""char"Splits into characters or whitespace-delimited words.
from"bottom" | "top" | "left" | "right""bottom"Direction from which each segment enters.
delaynumber40Delay between adjacent segments in milliseconds. Larger values create a slower wave.
durationnumber0.5Single segment animation duration (seconds)

The remaining <span> native attributes (className, etc.) are transparently transmitted; onDrag/onDragStart/onDragEnd/onAnimationStart is eliminated due to conflict with the motion signature.

Example

tsx
<SplitText text="Build faster, safer, and more beautifully" className="text-3xl font-bold text-foreground" />

<SplitText
  text="Build faster with HulianUI"
  splitType="word"
  from="left"
  className="text-3xl font-bold text-primary"
/>

Usage guidelines

  • useInView triggers only once, so the entrance does not replay. Change key to force a remount when a replay is required in a demo.
  • text accepts a plain string rather than children; JSX cannot be embedded.
  • Under prefers-reduced-motion, every segment renders directly in its final state.

Related

Text · Heading · Prose · Markdown · AuroraText · AnimatedShinyText

Playground

The title of entering the market at different peaks section by section
<SplitText text="Title of peak staggered entry step by step" splitType="char" from="bottom" delay={40} />
PreviousSparklesTextTypographyNextBlurText

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Example
    • Usage guidelines
    • Related
  • Playground