Font Weight

PreviousNext

An animated text component that smoothly varies font weight in a breathing motion. Useful for hero headlines or eye-catching animated typography.

font-weight-default

Installation

pnpm dlx shadcn@latest add https://ui.dalim.in/r/styles/default/font-weight.json

Usage

import { FontWeight } from "@/components/ui/font-weight"
<div className="relative flex h-screen w-full items-center justify-center">
  <FontWeight text="Breathe" />
</div>

API Reference

FontWeight

Renders animated text with variable font weight oscillation.

PropTypeDefaultDescription
textstringThe text content to animate.
classNamestring""Additional Tailwind/CSS classes for styling.
fontSizenumber150Font size (in pixels).
minWeightnumber0Minimum font weight variation setting.
maxWeightnumber840Maximum font weight variation setting.
animationDurationnumber1.5Duration (seconds) of one weight oscillation cycle.
delayMultipliernumber0.25Staggered delay factor for each character’s animation.