Skip to components
DEVELOPER REFERENCE · v4.0.0

AiPromptInput API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

AiPromptInput13 props3 callbacks0 methods

Props13

AiPromptInput props
NameTypeDescription
translationsOptional
AiUiTranslationsInspect type
Overrides the default UI strings. Supply only the entries you want to translate and retain any placeholders.
valueRequiredstringValue to display or edit. The declared type identifies the supported representation; change callbacks describe how edited values are emitted.
busyOptionalboolean | undefinedIndicates that an operation is in progress; interactive controls block activation while busy.
disabledOptionalboolean | undefinedDisables user interaction with the control.
labelOptionalstring | undefinedLabel content or accessible name for the component, as rendered by this control.
placeholderOptionalstring | undefinedContent shown when there is no entered or selected value.
submitLabelOptionalstring | undefinedAccessible text for sending the prompt.
stopLabelOptionalstring | undefinedAccessible text for stopping the current operation.
promptHistoryOptional
readonly string[] | undefinedInspect type
Opt-in local prompt recall. Arrow keys retain normal multiline behavior away from text edges.
hintOptionalstring | undefinedEmpty-draft keyboard guidance. An empty string lets toolbar context replace it.
actionsOptional
ComponentChildrenInspect type
Host-supported actions or context, displayed in the composer toolbar.
footerOptional
ComponentChildrenInspect type
Applied context or supplemental content above the bottom toolbar.
textareaPropsOptional
Pick<Omit<h.JSX.TextareaHTMLAttributes<HTMLTextAreaElement>, "className"> & { className?: string; onValueChange?: (value: string) => void; }, "className" | "rows" | "style"> | undefinedInspect type
Native textarea presentation and sizing; input behavior stays controlled here.

Events and callbacks3

AiPromptInput events and callbacks
NameTypeDescription
onValueChangeRequired
(value: string) => voidInspect type
Receives the updated input value. Store it in application state and pass it back through value.
onSubmitRequired
(value: string) => voidInspect type
Submits the current prompt value to the application-provided handler.
onStopOptional
(() => void) | undefinedInspect type
Requests cancellation of the in-progress AI operation.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.