Motionshelf
← All components

Text

Before and After Text

The old way is crossed out and the new way takes its place.

Install

npx shadcn@latest add https://motionshelf-pi.vercel.app/r/before-after-text.json

Copies the file into your project. Requires React 19, Tailwind CSS v4 and GSAP (installed as a dependency).

Props

NameTypeDefaultDescription
titlestring"Before and after"Heading above the rows.
rows{ before: string; after: string }[]three example rowsEach row: the old way and the new way.
accentstring"#1f5bff"Color of the new way.
loopbooleantrueReplay forever with a pause between runs.
classNamestring""Extra classes for the outer element.

Dependencies

  • gsap
  • @gsap/react