Skip to main content

Blur Text

Staggered text reveal and hide effect by character, word, or line using blur, opacity, and directional drift.

Interfaces with feeling begin with motion

Customize

Blur (px)8
Stagger (ms)32

Installation

npx shadcn@latest add @kinetic/blur-text

Usage

Pass the string to text and choose the split granularity with unit. By default, BlurText splits by word and reveals upward on mount.

import { BlurText } from "@/components/kinetic/ui/blur-text";

interface HeroTitleProps {
  readonly label: string;
}

export function HeroTitle({ label }: HeroTitleProps) {
  return <BlurText as="h1" text={label} className="text-3xl font-semibold" />;
}

Variants and units

Use variant to choose between soft (smooth deceleration), punch (crisp scale snap), and drift (wider float). Use direction (up, down, none) to set the travel axis.

Split by word (default) or line for body copy. Reserve unit="char" for short headings so each grapheme animates cleanly without inflating the node count.

<BlurText
  as="h2"
  text="Focused motion"
  unit="char"
  variant="punch"
  direction="up"
  blurPx={6}
/>

Imperative control

Set trigger="manual" or trigger="inView" and attach a BlurTextHandle ref to call play() and reverse() on demand. reverse() animates units from last to first at a faster cadence (0.6x duration, 0.5x stagger) and leaves them hidden.

import { useRef } from "react";
import { BlurText, type BlurTextHandle } from "@/components/kinetic/ui/blur-text";

export function ControlledBlur() {
  const ref = useRef<BlurTextHandle>(null);

  return (
    <div className="space-y-3">
      <BlurText ref={ref} text="Ready on cue" trigger="manual" />
      <div className="flex gap-2">
        <button type="button" onClick={() => ref.current?.play()}>
          Play
        </button>
        <button type="button" onClick={() => ref.current?.reverse()}>
          Reverse
        </button>
      </div>
    </div>
  );
}

Motion preferences

blurPx (clamped at 8px max), distancePx, staggerMs, durationMs, and speed scale with the global tempo setting. Under reduced motion, BlurText renders the final text immediately without blur or translation and invokes onComplete.

API Reference

BlurText

Grapheme-safe WAAPI blur reveal and reverse hide component.

PropTypeDefaultDescription
textstring-Text content to reveal.
unit"char" | "word" | "line""word"Split granularity. Use char for short headings only.
direction"up" | "down" | "none""up"Vertical slide direction.
variant"soft" | "punch" | "drift""soft"Easing and scale preset.
blurPxnumber8Maximum blur radius (clamped at 8px).
trigger"mount" | "inView" | "manual""mount"When to play automatically.
speednumber1Speed multiplier combined with global tempo.
onComplete() => void-Called when play or reverse finishes.