About
A button with primary, secondary, ghost and outline styles in four sizes, a spring press dip, a slight hover grow, and an optional Material-style ripple from the press point.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Animated Button to your project and fits it to your theme.
Code
How Animated Button is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import Button, { ButtonLink } from "@/components/ui/button-base";
export default function ButtonBaseDemo() {
return (
<div className="flex min-h-[320px] w-full flex-col items-center justify-center gap-6 bg-background p-10">
<div className="flex flex-wrap items-center justify-center gap-4">
<Button variant="primary">Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="outline">Outline</Button>
</div>
<div className="flex flex-wrap items-center justify-center gap-4">
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>
<Button size="icon" aria-label="icon action">
+
</Button>
</div>
<div className="flex flex-wrap items-center justify-center gap-4">
<Button ripple>Ripple on press</Button>
<ButtonLink href="#" variant="outline">
Link styled as button
</ButtonLink>
</div>
</div>
);
}















