Each letter leans toward the cursor and springs home, like a magnetic button for every character.
A round glass lens that follows the cursor across a headline, magnifying the letters beneath it with a refracted rim.
Customize
Usage
import { TextLoupe } from "@/components/motionkit/text-loupe";
<TextLoupe
as="h1"
text="Every detail, closer."
className="text-7xl font-semibold"
/>Motion
The exact curves this component runs, plotted with Motion's own maths.
Lens follows
Pointer moves
Hero headlines for camera, optics, design and detail-focused brands, and playful moments on portfolio sites.
A second copy of the heading sits exactly on top of the first, scaled up around the pointer and clipped to a circle, so only the area under the lens appears magnified. The lens position runs through a spring, and the glass rim is layered inset shadows with a coloured edge where light would bend.
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | — | The headline. |
| as | "h1" | "h2" | "h3" | "p" | "h2" | The element to render. |
| zoom | number | 1.8 | How much the lens magnifies. |
| size | number | 150 | Lens diameter in pixels. |
| accent | string | "#B9C7FF" | Colour of the rim's refracted edge. |
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/text-loupe. It saves the file to components/motionkit and installs its dependencies.
Text Loupe 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 lens follows the pointer directly without a spring.
Each letter leans toward the cursor and springs home, like a magnetic button for every character.
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.
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.
The live preview is free to explore. Plus unlocks the source for Text Loupe 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 { TextLoupe } from "@/components/motionkit/text-loupe";
<TextLoupe
as="h1"
text="Every detail, closer."
className="text-7xl font-semibold"
/>Motion
The exact curves this component runs, plotted with Motion's own maths.
Lens follows
Pointer moves