send-button
agent-elements/send-buttonFreeComponent
agent-elements publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by agent-elements on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://agent-elements.21st.dev/r/send-button.jsonSource
1import { IconArrowUp, IconPlayerStopFilled } from "@tabler/icons-react";2import { cn } from "../utils/cn";34export type SendButtonProps = {5 state: "idle" | "typing" | "streaming";6};78export function SendButton({ state }: SendButtonProps) {9 const isStreaming = state === "streaming";10 const isTyping = state === "typing";1112 if (isStreaming) {13 return (14 <div className="size-7 rounded-full bg-foreground flex items-center justify-center cursor-pointer">15 <IconPlayerStopFilled className="size-4 text-background" />16 </div>17 );18 }1920 return (21 <div22 className={cn(23 "size-7 rounded-full flex items-center justify-center",24 isTyping25 ? "bg-an-send-button-bg cursor-pointer"26 : "bg-muted cursor-default",27 )}28 >29 <IconArrowUp30 className={cn(31 "size-4",32 isTyping33 ? "text-an-send-button-color"34 : "text-neutral-400 dark:text-neutral-600",35 )}36 />37 </div>38 );39}
More from agent-elements
All 25 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| agent-chatagent-chat | agent-elements | Components | Free | no deps | |
| attachment-buttonattachment-button | agent-elements | Components | Free | no deps | |
| bash-toolbash-tool | agent-elements | Components | Free | no deps | |
| edit-tooledit-tool | agent-elements | Components | Free | no deps | |
| error-messageerror-message | agent-elements | Components | Free | no deps | |
| file-attachmentfile-attachment | agent-elements | Components | Free | no deps | |
| generic-toolgeneric-tool | agent-elements | Components | Free | no deps | |
| input-barinput-bar | agent-elements | Components | Free | no deps |
