lumesec

Send / Stop Button

Buttons 3

About

A round chat-input send button that morphs into a stop button with a spinning progress ring while a reply streams, then bursts into sparks on completion.

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

Code

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

Usage.tsx

"use client";

import * as React from "react";

import {
  UiSendButton,
  type UiSendButtonHandle,
} from "@/components/ui/send-stop-button";

export default function Example() {
  const button = React.useRef<UiSendButtonHandle>(null);
  const timer = React.useRef(0);
  return (
    <div className="flex min-h-[320px] w-full items-center justify-center bg-background p-10">
      <UiSendButton
        ref={button}
        onSend={() => {
          // stand-in for a streamed reply
          timer.current = window.setTimeout(
            () => button.current?.complete(),
            2000,
          );
        }}
        onStop={() => window.clearTimeout(timer.current)}
      />
    </div>
  );
}

More by lumesec

View all
  • Geo Traceroute

    Geo Traceroute

    80
  • Date Picker

    Date Picker

    25
  • Region Picker

    Region Picker

    20
  • Rotary Dial

    Rotary Dial

    19
  • Pixel Toaster

    Pixel Toaster

    14
  • Command Palette

    Command Palette

    11
  • Effort Slider

    Effort Slider

    9
  • Pixel Select

    Pixel Select

    7

More in Buttons

View all
  • Texture Button

    Texture Button

    108
  • Button

    Button

    14
  • Notification Button

    Notification Button

    117
  • HeroUI Button Group

    HeroUI Button Group

    2
  • Eclipse Button

    Eclipse Button

    44
  • Button Save

    Button Save

    50
  • App Store Button

    App Store Button

    484
  • Base Button

    Base Button

    1