Skip to content

Text Variable Proximity

Pro

The letters near the pointer get bolder or wider on a variable font, and the text around them does not move.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 14, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Text Variable Proximity needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
26
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

Wrap the words of a heading set in a variable font. Leave out from to start from the weight of the text.

The sample also uses Button. One command adds them with this item:

hero.tsx

TextVariableProximity

<span>
PropTypeDefaultDescription
pausedboolean—The pause of the user or the page (controlled).
defaultPausedboolean—The first pause when paused is not given (uncontrolled). Default false.
onPausedChange—Called when the pause changes.
localestring—The BCP 47 locale for the letter and word split (Intl.Segmenter). Default: the DisplayLocaleProvider locale, else "en-US".
childrenRequiredstring—The text. Its letters near the pointer move along the font axes from from to to.
fromstring—The font-variation-settings at rest, for each axis of to. Any axis the font has: wdth, opsz, slnt, GRAD, or a custom one. Default: read from the text (wght from its font-weight, wdth from its font-stretch), so a font-bold text starts at 700. Name an axis here that the text cannot give (opsz).
tostring—The font-variation-settings under the pointer: 'wght' 900 (default).
radiusnumber—How far the pointer reaches, in px from the center of a letter. Default 120.
falloff"distance""index"—How the effect falls off: by the distance of each letter (default), or by its index from the letter under the pointer, as icons in a dock (#/lib/pro/pointer-falloff-model).
spreadnumber—falloff="index" only: how many letters on each side react. Default 2.
rippleboolean—A press on the text sends a ring of weight out from the press point. Default on.
idleboolean—A slow bump crosses the text while the pointer is away (2.4s a pass, then 1.2s of rest), only on screen. paused stops it.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.
  • Use a variable font with the axes of to: the default 'wght' 900 needs a font with a weight axis. A font without the axis skips it.
  • Leave out from to start from the weight of the text (font-bold starts at 700). Set from for an axis the text cannot give, such as 'opsz' 12.
  • Set to lower than the rest weight for text that gets thinner under the pointer.
  • Use falloff="index" with spread for a dock of letters, and idle for a slow wave while the pointer is away.
  • For a mark on a key phrase that does not move, use Highlight.
  • For body text, a long paragraph, or a static font, use plain text.
TabMoves the focus to the link or button around the text. One sweep of weight crosses the letters from the start edge.
Follow
follow · spring (visual duration 0.23s, bounce 0.28) · each letter moves its axes toward its nearness, and settles back to rest when the pointer leaves
Ripple
progress · a ring of weight runs out from the press point at 0.8px per ms, and fades as it grows
Idle wave
progress · a bump halfway to `to` crosses the text in 2.4s, then rests 1.2s, only while the pointer is away
Focus sweep
progress · one bump crosses the text in 1.2s at full `to` on keyboard focus
  1. AddedText Variable Proximity.
Open the release