Breathing Text

Variable font breathing animation with staggered letter-by-letter weight transitions

Installation

pnpm dlx shadcn@latest add "https://vritti.thesatyajit.com/r/breathing-text"

Dependencies

pnpm add motion

Props

Breathing Text

PropTypeDefaultDescription
childrenReact.ReactNode-Text content to animate
asElementType"span"HTML element type to render as
fromFontVariationSettingsstring-Starting font variation settings value
toFontVariationSettingsstring-Ending font variation settings value
transitionTransition{ duration: 1.5, ease: "easeInOut" }Motion transition configuration for the animation
staggerDurationnumber0.1Delay between each letter's animation start in seconds
staggerFrom"first" | "last" | "center" | number"first"Direction from which the stagger effect originates
repeatDelaynumber0.1Delay between animation repetitions in seconds
classNamestring-Additional CSS classes