Text swap
Animates text when its value changes.
Gather
text-swap-demo.tsx
Installation
The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.
npm
yarn
pnpm
bun
API reference
- value: stringRequired
- The text to show. A change animates. The first value shows without animation. Where text cannot wrap, such as in a button, a long value truncates.