SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

On this page

ComposerSubmit

Island holding a composer's send control.

View code
tsx
<Composer method="post" action="/chat">
	<Composer.Input name="prompt" aria-label="Message" required />
	<Composer.Toolbar>
		<ComposerSubmit labels={{ send: "Send message", stop: "Stop response" }} stream="reply-7" />
	</Composer.Toolbar>
</Composer>

Installation

An ordinary dependency: install it, import the theme once, and import the component where it is used.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
import { ComposerSubmit } from "@sdxc/ui/chat";

Renders Send, or Stop while a reply streams. Enter sends a non-empty message unless an input method is composing; Escape stops a streaming reply.

Props

Read from the component's own types, so every prop, every default and every allowed value is listed.

@sdxc/ui

Can’t find it? Contact us