Headlines that arrive word by word or letter by letter: slide, blur, hinge or rise from behind a mask, from any direction.
Big letters cut like windows onto a landscape whose layers drift at different speeds with the pointer and the scroll, so the view has real depth.
Customize
Usage
import { WindowText } from "@/components/motionkit/window-text";
<WindowText as="h1" className="text-[10rem] font-black leading-none tracking-tight">
Wander
</WindowText>Motion
The exact curves this component runs, plotted with Motion's own maths.
Scene drifts
Pointer moves and scroll
Travel, outdoor and hospitality heroes, portfolio and agency headlines, and landing pages where one word should carry a mood.
The text is filled with a stack of background layers clipped to the letters with background-clip: text: a sky gradient, a sun or moon, and hills or sea drawn as small inline SVGs. Pointer position and scroll progress feed springs, and one motion value turns them into a background position for every layer, scaled by that layer's depth. The far sky barely moves while the nearest hills move most, which is what makes it read as a view through a window rather than a pattern. Because it's still real text, it selects, translates and reads normally.
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | The text. |
| scene | "dusk" | "sea" | "meadow" | "dusk" | The view through the letters. |
| src | string | — | Your own image to look through instead of a scene. |
| depth | number | 36 | How far the scene shifts with the pointer and scroll, in px. 0 holds it still. |
| as | ElementType | "span" | Element to render, e.g. h1. |
How we audit: the WCAG 2.2 animation checklist and respecting reduced motion in React.
Yes. The file starts with "use client", so you can import it straight into a Server Component page or layout. It works in Vite as is, and in Astro as a React island.
Only the motion package, beside React and Tailwind CSS v4. There is no MotionKit package and no Tailwind config to add.
Yes, with MotionKit Plus. Add the @motionkit registry and your personal token to components.json (the snippet is on your account page), then run npx shadcn@latest add @motionkit/window-text. It saves the file to components/motionkit and installs its dependencies.
Window Text is part of MotionKit Plus (£12 / $15 / €14 a month or £96 / $120 / €112 a year). The live preview and playground are free to explore; Plus unlocks its source code, every customisation control and commercial use.
With reduced motion on, the scene holds still.
Yes: pass src and the image fills the letters instead of a scene, drifting with the pointer and scroll. A wide landscape photo with a bright sky works best, since that's what shows through most of the letters.
Headlines that arrive word by word or letter by letter: slide, blur, hinge or rise from behind a mask, from any direction.
A heading revealed by drops of ink landing across it and spreading until they meet, with a soft halo at the wet edges.
A headline cut into bands like a sliced print: hover and the bands slide apart in alternate directions, revealing the word in a second colour through the cut.
Wander
The live preview is free to explore. Plus unlocks the source for Window Text and every other premium component.
Not ready for Plus? A free account unlocks 4 premium components, Depth Card, Rolling Text, Dot Wave and Confetti Button, with no card needed.
Customize
Usage
import { WindowText } from "@/components/motionkit/window-text";
<WindowText as="h1" className="text-[10rem] font-black leading-none tracking-tight">
Wander
</WindowText>Motion
The exact curves this component runs, plotted with Motion's own maths.
Scene drifts
Pointer moves and scroll
Wander