PromptInput
Conversation composer: auto-growing multiline input, Enter to submit, Shift+Enter for a newline, suggestions, send/stop state, plus prefix/actions/footer slots.
Basic Usage
Type a message + suggestions (click to fill; Enter submits)
Loading / Disabled
While loading, the host reflects aria-busy="true", the send button becomes "Stop" and dispatches oas-stop; readonly restricts editing but does not block the stop command.
loading: send becomes stop; disabled: input and submit are blocked
Read-only / maxlength / rows / submit policy
Slots
prefix / actions / footer slots
API
oas-prompt-input
Attributes
| Attribute | Description | Type | Default |
|---|---|---|---|
clear-on-submit | Clear after submit (default true) | string | true |
disabled | Disable input and submit | boolean | — |
loading | Generating; send button becomes stop | boolean | — |
maxlength | Maximum character count | string | — |
placeholder | Placeholder (defaults to i18n promptInput.placeholder) | string | — |
readonly | Read-only (focus/copy, no edits) | boolean | — |
rows | Initial rows (1+, auto-grow capped at 160px) | string | 1 |
submit-on-enter | Enter submits (default true; false requires the button; Shift+Enter always newlines) | string | true |
suggestions | Suggestions JSON: strings or { label?, value } items | string | — |
value | Current text (property channel; attribute is the initial value) | string | — |
Property (JS property; see each row for attribute reflection)
| Property | Description | Type | Default |
|---|---|---|---|
value | Current text (read/write) | string | — |
Methods
| Method | Signature | Description |
|---|---|---|
submit | submit(): boolean | Submit current text; returns false for empty/disabled/loading |
stop | stop(): void | Stop generation (dispatches oas-stop only while loading) |
focusInput | focusInput(): void | Focus the inner textarea |
Events
| Event | Description |
|---|---|
oas-stop | Dispatched when the stop button is clicked while loading, detail: {} |
oas-submit | Dispatched on submit, detail: |
oas-suggestion-select | Dispatched when a suggestion is clicked, detail: |
Slots
| Name | Description |
|---|---|
actions | Actions before the send button |
footer | Footer/help row |
prefix | Content before the input |