Skip to main content

Scroll Blur Text

Words sharpen as they enter the center of the scrollport and blur again as they leave.

Motion is not decoration.It tells people what appeared, what left, and where to look next.A light blur softens transitions so blocks of copy settle naturally.Use just enough, at the right moment, then let the content speak.

Scroll inside the box to sharpen words.

Customize

Max blur (px)6
Min opacity0.25
Shift (px)6

Installation

Add ScrollBlurText with the registry command:

npx shadcn@latest add @kinetic/scroll-blur-text

Usage

Import ScrollBlurText and pass the text to split into words:

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

export function EditorialLead() {
  return (
    <ScrollBlurText
      text="Words come into focus as you scroll through the page."
      className="text-2xl font-medium"
    />
  );
}

Blur, opacity, and shift

Tune maxBlurPx (clamped at 8 px), minOpacity, shiftPx, and speed to match your reading rhythm:

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

interface ScrollQuoteProps {
  readonly quote: string;
}

export function ScrollQuote({ quote }: ScrollQuoteProps) {
  return (
    <ScrollBlurText
      text={quote}
      maxBlurPx={6}
      minOpacity={0.25}
      shiftPx={6}
      speed={1.25}
    />
  );
}

Manual control

Set trigger="manual" and use the ref handle to attach (play) or clear (reverse) the scroll effect on demand:

import { useRef } from "react";
import {
  ScrollBlurText,
  type ScrollBlurTextHandle,
} from "@/components/kinetic/ui/scroll-blur-text";

export function ControlledScrollText() {
  const textRef = useRef<ScrollBlurTextHandle>(null);

  return (
    <div>
      <ScrollBlurText
        ref={textRef}
        text="Attach or clear scroll focus at any time."
        trigger="manual"
      />
      <button type="button" onClick={() => textRef.current?.play()}>
        Play
      </button>
      <button type="button" onClick={() => textRef.current?.reverse()}>
        Reverse
      </button>
    </div>
  );
}

Motion preferences

When native ViewTimeline is available, ScrollBlurText drives blur, opacity, and vertical shift through the Web Animations API on the compositor thread without setting permanent will-change layers; because scroll timelines are continuous, onComplete only fires in reduced-motion or fallback modes. In browsers without ViewTimeline, it falls back to a multi-threshold IntersectionObserver driven by each word's intersectionRatio (words stay sharp across most of the viewport and soften near the edges rather than focusing strictly at the center) with zero layout reads on scroll. Under reduced motion, all words remain sharp at full opacity and no timeline or observer is attached.

API Reference

ScrollBlurText

Scroll-linked word focus component avoiding per-frame layout reads.

PropTypeDefaultDescription
textstring-Paragraph text inside a scrollable container or page.
maxBlurPxnumber6Blur radius at scrollport edges (max 8px).
minOpacitynumber0.25Opacity at scrollport edges.
shiftPxnumber6Vertical offset in pixels when blurred.