Swell Text

Letters swell and thicken like a wave rising under the cursor.

no dependenciesMIT · free

Installation

npx shadcn@latest add https://ombakui.com/r/swell-text.json

Usage

import { SwellText } from "@/components/swell-text";

// best with a variable font that has a weight axis
<SwellText text="Ride the swell" className="text-7xl" />

Props

PropTypeDefaultDescription
text*string–The text. Plain text.
asElementType"span"HTML tag to render.
radiusnumber140Radius (px) of the swell around the cursor.
maxScalenumber1.5Maximum scale of a letter right under the cursor.
weightbooleantrueAlso thicken letters (needs a variable font with a weight axis).
classNamestring–