Input
Text input control in a bot message with an inline onSubmit handler.
Overview
Input is a free-text control. The submitted text arrives in the inline onSubmit handler as a string. Place it as a direct child of Message (a sibling of Section / Actions) — on Slack it renders as its own input block, and an Input placed inside an Actions row is dropped by the renderer.
Import
import { Input } from "@copilotkit/bot-ui";Props
Prop
Type
Prop
Type
Prop
Type
Prop
Type
Usage
<Message>
<Section>Anything to add before I file this?</Section>
<Input
placeholder="Add a note for the postmortem…"
multiline
onSubmit={async ({ thread, action }) => {
await thread.post(`Noted: ${action.value}`);
}}
/>
</Message>On Slack
Renders as an input block wrapping a plain_text_input element. Must be a top-level block — inside an Actions row the Slack renderer silently drops it.
Related
- Button — single-click control
- InteractionContext — what the handler receives