Skip to content
Premium & Brand

Slide Up Text

Text that slides up from below, staggered by word, character, or line.

Import

tsx
import { SlideUpText } from "@cronus-ui/ui";
bash
npx cronus-ui add slide-up-text

Examples

API Reference

Generated from the component's exported types.

SlideUpTextProps

Extends Omit< ComponentPropsWithoutRef<"span">, | "children" | "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration" | "onDrag" | "onDragStart" | "onDragEnd" >

Skip SlideUpTextProps props table
PropTypeDefaultDescription
ref
Ref<HTMLSpanElement>
animationRef
Ref<SlideUpTextRef>Imperative start / reset handle (Spell's `ref`).
children*
stringThe phrase to reveal. Must be a plain string so it can be split.
split
SlideUpTextSplit"words"How the string is broken before staggering.
delay
number0Delay (seconds) before the first unit animates.
stagger
number0.1Gap (seconds) between consecutive units.
from
SlideUpTextFrom"first"Which end of the string the stagger starts from.
transition
AnimationOptionsDEFAULT_TRANSITIONMotion transition for each unit. Defaults to Spell's 0.5s tween.
wordClass
stringExtra classes on each word (or line) clip.
charClass
stringExtra classes on each character clip.
autoStart
booleantruePlay on mount when `inView` is false.
onStart
() => voidCalled when the reveal starts.
onComplete
() => voidCalled when the last unit finishes.
inView
booleanfalseStart when the node enters the viewport instead of on mount.
once
booleantrueWhen `inView` is true, play only the first time it enters.