Text
Weight Wave
Hover-reactive text effect that smoothly increases font weight with a falloff across neighboring characters. Requires a variable font.
- lit
- gsap
Preview
Move your cursor over the text to shift font weight with a smooth falloff. Requires a variable font.
Attributes
Installation
pnpm dlx shadcn@latest add https://motion-kit-astro.vercel.app/r/weight-wave.json Usage
---
import "@/components/motion-kit/weight-wave-element.ts";
---
<motion-weight-wave text="Hover me"></motion-weight-wave> API Reference
| Attribute | Type | Default |
|---|---|---|
text The text content to display and animate. | string | "" |
base-weight Base font weight when not hovering. | number | 350 |
hover-weight Font weight at cursor position. | number | 750 |
influence-radius Number of neighboring characters affected by the wave. | number | 3 |
falloff-power Power curve for weight falloff (higher = sharper falloff). | number | 1.5 |
duration Animation duration in seconds. | number | 1.0 |
ease easing function for the animation. | string | "power3.out" |