Account

Typography

Creative

Split Text

Rise, drop, spin, pop, skew or swing; from the start, end, centre or at random. Spring-driven so the line feels physical.

Install

Included with Creative: needs your API key. Initialize and log in once.

Terminal
npx @galactrex/ui add split-text

Usage

Example
import { SplitText } from "@/components/galactrex/split-text";

<SplitText text="Launch week" effect="pop" order="center" />

Source

Installs to components/galactrex/split-text.tsx, with the shared motion primitives beside it.

Source for this component comes with its plan. Install it with the command above, or open your licensed copy here.

See plans

Props

PropTypeDefaultDescription
textstring—The text.
asElementType"h2"Element.
by"word" | "char""char"Pieces.
effect"rise" | "drop" | "spin" | "pop" | "skew" | "swing""rise"Entrance.
trigger"mount" | "inView" | "hover" | "manual""inView"When it plays.
activeboolean—Plays when true, for trigger="manual".
staggernumber0.025Seconds between pieces.
order"start" | "end" | "center" | "random""start"Stagger order.
classNamestring—Extra classes for the outer element.

Variants

  • Six effects. Each with four orders.

Accessibility

  • Real text read once.

Motion and reduced motion

  • Spring transforms per piece.
  • Reduced motion: shown at once.