ebnsina

Action Button

Buttons

About

A button that runs an async action and morphs in place to show working, success, or failure, keeping its size through every state.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Action Button to your project and fits it to your theme.

Code

How Action Button is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import ActionButton from "@/components/ui/action-button";

export default function ActionButtonDemo() {
  const send = () => new Promise((resolve) => setTimeout(resolve, 1200));

  return (
    <div className="flex items-center justify-center p-10">
      <ActionButton action={send} done="Sent">
        Send to the copyists
      </ActionButton>
    </div>
  );
}

Dependencies

More by ebnsina

View all
  • Countdown Timer

    Countdown Timer

    35
  • Video Player

    Video Player

    26
  • Alarm Clock

    Alarm Clock

    24
  • Hourglass Timer

    Hourglass Timer

    19
  • Voice Note

    Voice Note

    19
  • Sortable List

    Sortable List

    17
  • Sign In Auth Card

    Sign In Auth Card

    13
  • Split Button

    Split Button

    13

More in Buttons

View all
  • Hero Button

    Hero Button

    21
  • Eclipse Button

    Eclipse Button

    9
  • Button

    Button

    141
  • Button

    Button

    19
  • Texture Button

    Texture Button

    111
  • HeroUI Toggle Button

    HeroUI Toggle Button

  • Random Letter Swap CTA Buttons

    Random Letter Swap CTA Buttons

    64
  • Water Ripple Button

    Water Ripple Button

    4