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| Name | Type | Default | Description |
|---|---|---|---|
label | string | "" | The text. |
fromFontVariationSettings | string | "'wght' 400, 'opsz' 9" | The font variation settings letters rest at, away from the cursor. |
toFontVariationSettings | string | "'wght' 1000, 'opsz' 40" | The font variation settings a letter reaches under the cursor. |
containerRef | RefObject<HTMLElement | null> | None | An element around the text; letters skip their distance checks while the cursor is farther than the radius from it. |
radius | number | 50 | The distance from the cursor, in pixels, within which letters react. |
falloff | "linear" | "exponential" | "gaussian" | "linear" | How the effect fades with distance. |
smoothing | number | 0.2 | How gently letters ease toward their new settings, 0 (instant) to 1 (a slow, trailing wake). |
fromColor | string | "" | The colour letters rest at; empty keeps the text colour. |
toColor | string | "" | The colour letters shift toward as the cursor gets close; empty keeps the text colour. |
scale | number | 1 | The size a letter grows to right under the cursor; 1 keeps letters at their size. |
lift | number | 0 | How far, in em, a letter right under the cursor rises. |
idleWave | boolean | false | While the cursor is away, a gentle wave of weight travels across the text. |
fontSize | number | string | None | The font size; numbers are pixels. Empty inherits the surrounding size. |
className | string | None |