Astryx

Astryx Chat Send Button

Buttons 2

About

Circular send/stop toggle button for the chat composer. Place it inside ChatComposer where it reads context automatically: no wiring needed. When streaming starts, the button switches from a primary send icon to a secondary stop icon. Override any context value via props for standalone or custom usage.

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

Code

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

Usage.tsx

// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {ChatSendButton} from '@/components/ui/astryx-chat-send-button';
import {Icon} from '@astryxdesign/core/Icon';
import {Stack} from '@astryxdesign/core/Layout';
import {SparklesIcon} from '@heroicons/react/24/solid';

function ChatSendButtonShowcase() {
  return (
    <Stack direction="horizontal" gap={3} vAlign="center">
      <ChatSendButton isDisabled={false} onSend={() => {}} />
      <ChatSendButton
        isDisabled={false}
        onSend={() => {}}
        sendIcon={<Icon icon={SparklesIcon} size="sm" />}
      />
      <ChatSendButton isStopShown onStop={() => {}} />
    </Stack>
  );
}

export default function ChatSendButtonShowcaseDemo() {
  return (
    <div
      data-astryx-theme="neutral"
      data-theme="light"
      style={{colorScheme: 'light', display: 'contents'}}>
      <ChatSendButtonShowcase />
    </div>
  );
}

Dependencies

More by Astryx

View all
  • Astryx Banner

    Astryx Banner

    59
  • Astryx Aspect Ratio

    Astryx Aspect Ratio

    31
  • Astryx Avatar

    Astryx Avatar

    30
  • Astryx Badge

    Astryx Badge

    29
  • Astryx Button Group

    Astryx Button Group

    27
  • Astryx Chat Composer Drawer

    Astryx Chat Composer Drawer

    20
  • Astryx Toggle Button

    Astryx Toggle Button

    17
  • Astryx Avatar Group

    Astryx Avatar Group

    9

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