About
Animated button whose label swaps letter-by-letter — the old text's characters roll away as the new ones drop in, left to right — ideal for copy/copied and other stateful action toggles.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Action Swap Cascade to your project and fits it to your theme.
Code
How Action Swap Cascade is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import { ActionSwapCascadeButton } from "@/components/ui/action-swap-cascade";
const CTA_ITEMS = [
{ id: "copy", label: "Copy link", ariaLabel: "Copy link" },
{ id: "copied", label: "Copied!", ariaLabel: "Copied" },
];
export default function ActionSwapCascadePreview() {
return (
<div className="flex w-full justify-center">
<ActionSwapCascadeButton items={CTA_ITEMS} variant="primary" />
</div>
);
}
















