Playground
Change the props and copy the code. The controls come from the component's TypeScript types.
Props
by
stagger60
import { TextAnimate } from "@/components/ui/aurora";<TextAnimate text="Build it once, theme it everywhere." />Installation
$ pnpm dlx shadcn@latest add @synccn/text-animateFirst time in this project? Connect synccn with one command.
Usage
import { TextAnimate } from "@/components/ui/aurora";<TextAnimate text="Ship faster" />API reference
Generated from the component's TypeScript types, so it always matches the code.
TextAnimate
Words or letters rise into place one after another when shown.
PropTypeDescription
- textrequired
stringText to animate.
- by
"word" | "letter"Default
"word"Animate word by word or letter by letter.
- stagger
numberDefault
60Milliseconds between each part.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA attributes: aria-label, aria-pressed
- Respects the reduced motion setting
- Shows a visible focus ring for keyboard users
More motion
MarqueeEndless scrolling row or column that pauses on hover.Number TickerCounts up to a number when it scrolls into view.TypewriterTypes and deletes a list of phrases.Shimmer TextA light sweep across text for loading moments.Word RotateCycles words with a vertical slide.Text ScrambleCharacters scramble and resolve left to right.