Mark Yo

Animated Button

Buttons

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>
  );
}

Dependencies

More by Mark Yo

View all
  • Loader

    Loader

    64
  • Pricing Table

    Pricing Table

    23
  • Bento Grid

    Bento Grid

    2
  • Expandable Tabs

    Expandable Tabs

    1
  • Stateful Button

    Stateful Button

  • Morphing Modal

    Morphing Modal

  • Morph Popover

    Morph Popover

  • Kbd

    Kbd

More in Buttons

View all
  • Button

    Button

    37
  • Button

    Button

    20
  • Texture Button

    Texture Button

    113
  • Icon Label Subtext Button

    Icon Label Subtext Button

    68
  • Astryx Chat Send Button

    Astryx Chat Send Button

    5
  • Button

    Button

    16
  • Minimal Button

    Minimal Button

    15
  • Button

    Button

    146