Components / Text
Flip Words
Cycles through words, flipping each one in letter by letter in 3D.
Make it beautiful
Installation
Requires React 18+ and Tailwind CSS.
- 1
Install dependencies
$ npm install motion - 2
Add the component
Copy the code from the Code tab above into
components/ui/flip-words.tsx. - 3
Use it
example.tsximport { FlipWords } from "@/components/ui/flip-words"; export default function FlipWordsDemo() { return ( <p className="text-center text-3xl font-semibold tracking-tight text-zinc-900 dark:text-white"> Make it{" "} <FlipWords words={["beautiful", "animated", "delightful", "yours"]} className="text-orange-400" /> </p> ); }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| words | string[] | — | Words to cycle through. |
| interval | number | 2600 | Milliseconds each word stays. |