Daniel Petho

Breathing Text

Text 103

About

A text component that animates the font variation settings of letters in a breathing effect continuously. Works only with 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.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Breathing Text to your project and fits it to your theme.

Code

How Breathing Text is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { BreathingText } from "@/components/ui/breathing-text"

function Preview() {
  return (
    <div className="w-full h-full min-h-[500px] text-5xl sm:text-7xl md:text-9xl flex flex-row gap-12 items-center justify-center font-overusedGrotesk bg-[#1f464d]">
      <div className="flex flex-col items-center justify-center text-white">
        <BreathingText
          label="Breathe!"
          staggerDuration={0.1}
          fromFontVariationSettings="'wght' 100, 'slnt' 0"
          toFontVariationSettings="'wght' 800, 'slnt' -10"
        />
      </div>
    </div>
  )
}

export { Preview }

Dependencies

More by Daniel Petho

View all
  • Parallax Floating

    Parallax Floating

    2.3K
  • Text Rotate

    Text Rotate

    2.1K
  • Typewriter

    Typewriter

    1.9K
  • Marquee Along SVG Path

    Marquee Along SVG Path

    1.5K
  • Image Trail

    Image Trail

    1.4K
  • Animated Gradient With SVG

    Animated Gradient With SVG

    904
  • Text Cursor Proximity

    Text Cursor Proximity

    802
  • Pixel Trail

    Pixel Trail

    657

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    134
  • Astryx Chat Tokenized Text

    Astryx Chat Tokenized Text

    9
  • Text Reveal

    Text Reveal

    31
  • Rainbow Text Effect

    Rainbow Text Effect

    61
  • Scroll Fill Headline

    Scroll Fill Headline

    44
  • Shine Border

    Shine Border

    1K
  • Split text

    Split text

    79
  • Motion Blur Text

    Motion Blur Text

    47