Docs
Breathing Text

Breathing Text

A text component that animates the font variation settings of letters in a breathing effect continuously. Works only with variable fonts.

Breathe!

Understanding Variable Fonts


This component is designed to work exclusively with variable fonts. Please refer to the Variable Font Hover By Letter documentation for more details.

Source code


Copy and paste the following code into your project:

Notes


Since the animation is continous, keep the performance in check when using this component.

Props


PropTypeDefaultDescription
label*string-The text to be displayed and animated
fromFontVariationSettings*string-Initial font variation settings
toFontVariationSettings*string-Target font variation settings on hover
classNamestring-Additional CSS classes for styling
transitionDynamicAnimationOptions{ type: "spring", duration: 0.7 }Transition settings for the animation. Refer to framer-motion docs for more details
staggerDurationnumber0.03Delay between each letter's animation start
staggerFrom"first" | "last" | "center" | number"first"Starting point of the stagger effect. Number is the index of the letter where the stagger animation starts
onClick() => void-Callback function for click events