Sender

The input at the bottom of a chat, with a send button that turns into a stop button while a reply streams.

Basic

Control the text with value and onChange, and handle the message in onSubmit, which Enter and the send button both call.

Auto size

Pass autoSize with minRows and maxRows to let the input grow with its text, then scroll.

Submit key

Set submitType to shiftEnter so Enter adds a new line and Shift + Enter sends.

Loading

Set loading while a reply is streaming, so the send button turns into a stop button that calls onCancel.

Read only

Set readOnly to show a message that cannot be edited, like one that is already being answered.

Disabled

Set disabled to block typing and sending, like when the user has run out of messages.

Ref methods

Use the ref to insert text at the cursor, the start or the end, and to focus, select or blur the input.

Custom suffix

Pass a function to suffix to rebuild the action area from the send, loading, clear and speech buttons it receives.

Send button

Style the send button through suffix: change its shape or icon, or wrap it in a tooltip.

Disable sending

Return a disabled send button from suffix until there is text or an attached file to send.
Pass footer to add a toolbar under the input, and set suffix to false to move the send button into it.

Upload panel

Pass Sender.Header to header to open a panel above the input, here an upload area toggled by the paperclip.

Quote

Use a Sender.Header with only a title to show the message being replied to, with a close button to drop it.

Paste files

Handle onPasteFile to catch files pasted into the input and add them to an Attachments list in the header.

Switch

Sender.Switch is a toggle button for options like search or reasoning, with loading, disabled and its own on and off labels.

Voice input

Set allowSpeech to add a microphone button that turns speech into text, after the browser asks for permission.

Custom voice input

Pass recording and onRecordingChange to allowSpeech to drive the microphone button from your own speech service.

Slots

Pass slotConfig to mix fixed text with fields, a select, a tag and a custom control, and skill to show the active skill.

Slot format

Give a slot formatResult to change how its value is written into the message that onSubmit receives.

Required slot

Keep the send button disabled until a slot is filled, by checking the value onChange reports.

Mentions

Wrap the input in Suggestion and open it on @, then insert a slot at the cursor for the chosen item.

In context

The component inside real screens, with the components it usually sits beside.

Agent input

An agent input with a toolbar that switches skills, toggles reasoning and inserts a file tag into the message.

Chat panel

A chat panel where each sent message joins a Bubble.List, followed by an assistant reply that types itself in.

Editor side panel

An assistant panel beside a document, where the highlighted passage is quoted above the input and closes once you ask.

Prompt composer

A prompt composer with attached files above the input and a model picker, a web search toggle and the send button below it.

Mobile assistant

A phone-width assistant sheet with a greeting, suggested questions that fill the input, and voice input beside the send button.