Components/GretTech/Proximity Text

Proximity Text

A headline whose letters swell, lift and light up as the cursor gets close, like a magnifying wave. Stays real, indexable text.

v0

Installation

Full Setup guide

Install the component automatically via Shadcn CLI.

npx shadcn@latest add https://www.grettech.com/api/registry/proximity-text

Props

PropTypeDefaultDescription
children*
string-The text.
as
"h1" | "h2" | "h3" | "p" | "span""h2"Element to render.
radius
number140Reach of the effect in px.
maxScale
number1.45Scale of the letter under the cursor.
lift
number10How far the nearest letter rises, in px.
accentColor
string"#8b5cf6"Colour letters take on near the cursor.
weight
number600Font weight away from the cursor. Use this rather than a font-* class.
weightBoost
number300Extra weight near the cursor; smooth with a variable font such as Inter.
className
string-Extra classes for the text element.
...props
React.HTMLAttributes<HTMLElement>-Any other attributes, passed to the text element.