<SplitText> component accepts all Motion animation props. These props can use flat targets (applied to the most granular split type) or per-type targets for specific control over chars, words, lines, and the wrapper element.
Animation Lifecycle Props
Initial variant applied instantly after text is split. Transitions are ignored on mount.
- String: Reference to a named variant in
variantsprop - Object: Inline variant definition
- false: Skip initial variant application
Variant to animate to immediately after split completes.
Variant to animate to when component exits. Requires wrapping in
<AnimatePresence>.Set to false to disable exit animations.Viewport Props
Variant to animate to when the element enters the viewport.Configure viewport detection with the
viewport prop (see React SplitText).Variant to animate to when element leaves viewport.Use with
resetOnViewportLeave to reset animations when scrolling away.Scroll-Driven Animation
Variant whose animation progress is driven by scroll position.Takes priority over Configure scroll behavior with the
animate and whileInView. Animation values interpolate based on scroll progress within the defined range.scroll prop.Configuration for
whileScroll animations.Properties:offset- Scroll range as[start, end]strings. Default:["start end", "end start"]axis- Scroll axis ("x"or"y"). Default:"y"container- React ref to scroll container. Default: nearest scrollable ancestor
Gesture Props
Variant to animate to when hovering over the wrapper element.
Variant to animate to when tapping/clicking the wrapper element.
Variant to animate to when the wrapper element receives focus.
Transition
Global transition options applied to all variant animations.Individual variant transitions take precedence over this global value.Common properties:
duration- Animation duration in secondsdelay- Delay in seconds (can be a function:(index, count) => number)ease- Easing functiontype- Animation type ("tween","spring","inertia")
Delay Scope
Controls how delay functions (and function variants) resolve indices.
global: UsesglobalIndexandglobalCount(all elements of that type across entire split)local: Usesindexandcount(elements within nearest parent group - line for chars, etc.)
Custom Data
Custom data forwarded to function variants.Access via the
custom parameter in VariantInfo.Behavior Props
When true, auto-resplit (triggered by window resize with When
autoSplit: true) replays the initial → animate transition.false (default), resplits maintain the current animated state without replaying the animation.Controls how the component handles reduced motion preferences.
user: Respects systemprefers-reduced-motionsettingalways: Always reduces motion (instant transitions)never: Never reduces motion
Hover Events
Called when hover starts on the wrapper element.
Called when hover ends on the wrapper element.
Flat vs Per-Type Targets
All animation props accept either:- Flat targets - Applied to the most granular split type
- Per-type targets - Specific targets for chars, words, lines, and wrapper
Flat Target
Applied to the most granular element type based onoptions.type:
Per-Type Targets
Explicitly target different element types:Related
- Variants - Deep dive into variants and function variants
- SplitText - Main component documentation
- React SplitText - Base React props (viewport, callbacks, etc.)