# Text Loupe

> A round glass lens that follows the cursor across a headline, magnifying the letters beneath it with a refracted rim.

Category: Text · MotionKit Plus · Updated 2026-11-14 · Live demo: https://www.motionkitui.com/components/text-loupe

## When to use it

Hero headlines for camera, optics, design and detail-focused brands, and playful moments on portfolio sites.

## How it works

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.

## Installation

Part of MotionKit Plus (https://www.motionkitui.com/pricing). Subscribers install it with `npx shadcn@latest add @motionkit/text-loupe` after adding their registry token from https://www.motionkitui.com/account.

## Props

| 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. |

## Accessibility

- **Keyboard: Not applicable.** A pointer flourish over ordinary text; nothing needs operating.
- **Screen readers: Pass.** The heading is read normally; the magnified copy and lens are hidden.
- **Reduced motion: Pass.** With reduced motion on, the lens follows the pointer directly without a spring.
- **Colour contrast: Pass.** Inherits your text colour; the magnified copy is drawn in near-white for clarity.
