Skip to content
PixiKit

Proximity Type

Letters shift their font variation settings, colour and size by their distance from the cursor, with an idle wave.

pixikit.com/docs/effects/proximity-type

Customize

Radius100px
Falloff
Smoothing0.20
From color
To color
Scale1.00
Lift0.00em
Idle wave
Font size64px

Props

14
NameTypeDefaultDescription
labelstring""The text.
fromFontVariationSettingsstring"'wght' 400, 'opsz' 9"The font variation settings letters rest at, away from the cursor.
toFontVariationSettingsstring"'wght' 1000, 'opsz' 40"The font variation settings a letter reaches under the cursor.
containerRefRefObject<HTMLElement | null>NoneAn element around the text; letters skip their distance checks while the cursor is farther than the radius from it.
radiusnumber50The distance from the cursor, in pixels, within which letters react.
falloff"linear" | "exponential" | "gaussian""linear"How the effect fades with distance.
smoothingnumber0.2How gently letters ease toward their new settings, 0 (instant) to 1 (a slow, trailing wake).
fromColorstring""The colour letters rest at; empty keeps the text colour.
toColorstring""The colour letters shift toward as the cursor gets close; empty keeps the text colour.
scalenumber1The size a letter grows to right under the cursor; 1 keeps letters at their size.
liftnumber0How far, in em, a letter right under the cursor rises.
idleWavebooleanfalseWhile the cursor is away, a gentle wave of weight travels across the text.
fontSizenumber | stringNoneThe font size; numbers are pixels. Empty inherits the surrounding size.
classNamestringNone

More text effects in Pro

View all

Related