Animated React card components

Add card

An empty state for payments: a card floats over its slot and tilts toward you. Press to type it in and drop it into place.

Cards, press, Motion

Install

npm i clsx motion tailwind-merge && curl -o components/add-card.tsx https://motion-brew.com/r/add-card.tsx

One self contained file for React and Tailwind CSS: add-card.tsx. Or ask your AI agent to add it through the MCP server.

Usage

import { AddCard } from "@/components/add-card";

export default function Page() {
  return <AddCard onAdd={() => openCardForm()} />;
}

Props

PropTypeDefaultDescription
titlestring"Add your first card"Card title
subtitlestringa short lineLine under the title
ctastring"Add card"Button label
doneLabelstring"Card added"Button label once the card is in
notestringa short lineSmall line under the button; empty hides it
last4string"4242"Last four digits shown once added
holderstring"Alex Morgan"Name shown once added
expirystring"08/29"Expiry shown once added
onAdd() => void \PromiseCalled on press; a promise holds the card until it settles, a rejection puts it back
classNamestringSize and shape of the card

More cards

  • Booking card: Pick a month, a day and a time: ink pills glide between choices, the times unfold, and the button rolls to your slot and the whole card turns into a confirmation with GSAP-drawn icons.
  • Orbit card: A community card where people and app chips orbit a center mark.
  • Globe card: A feature card with a dotted three.js globe: arcs fly between people around the world and land with their avatar.
  • Avatar testimonial: Testimonials driven by a row of avatars: each quote rises in word by word out of a blur, and a ring fills around the active avatar until the next one.

All animated react card components