Lettering made of glass: see-through letters with a bright top edge, a fine rim and a soft glow, and a highlight that glides across with the pointer.
Letters cut from iridescent glass: a soap-film spectrum flows through them and, as the cursor nears, they split into red and blue fringes like light through a prism.
Customize
Usage
import { PrismText } from "@/components/motionkit/prism-text";
<PrismText as="h1" className="text-8xl font-semibold tracking-tight">
Spectrum
</PrismText>Motion
The exact curves this component runs, plotted with Motion's own maths.
Spectrum flows
Runs on its own
Fringes split
Pointer moves
Holographic and creative brands, product names, launch headlines and anywhere a single word should feel like light.
The letters are clipped to two backgrounds: a pale spectrum twice as wide as the text that slides across on a slow loop, and a white fade along their tops that reads as a bright glass edge. The red and blue fringes are hard drop shadows of the letters, offset in opposite directions. Their offset is held in CSS variables that the pointer sets, along the line from the text's centre towards the pointer and stronger the nearer it gets, so the light splits the way it would through a prism. Nothing re-renders as the pointer moves.
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | The text. |
| split | number | 6 | Largest red and blue split, in px. |
| duration | number | 8 | Seconds for the colour to flow across once. 0 holds it still. |
| interactive | boolean | true | Let the fringes respond to the pointer. |
| 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.
Nothing beyond 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/prism-text. It saves the file to components/motionkit and installs its dependencies.
Prism 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 colour stops flowing; the fringes still follow the pointer, which only moves when you do.
Lettering made of glass: see-through letters with a bright top edge, a fine rim and a soft glow, and a highlight that glides across with the pointer.
A frosted glass panel with your words cut clean through it, so the colour drifting behind shows soft through the frost and sharp through the letters.
A round glass lens that follows the cursor across a headline, magnifying the letters beneath it with a refracted rim.
Spectrum
The live preview is free to explore. Plus unlocks the source for Prism 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 { PrismText } from "@/components/motionkit/prism-text";
<PrismText as="h1" className="text-8xl font-semibold tracking-tight">
Spectrum
</PrismText>Motion
The exact curves this component runs, plotted with Motion's own maths.
Spectrum flows
Runs on its own
Fringes split
Pointer moves
Spectrum