AiPromptInput

Prompt Input

Textarea input with submit, stop, and slot customization.

Usage

<AiPromptInput v-model="input" submit-shortcut="mod+enter" @submit="send">
  <template #actions="{ submit, canSubmit }">
    <button :disabled="!canSubmit" @click="submit">Send</button>
  </template>
</AiPromptInput>

Props

Prop Type Default Description
modelValuestring''Input value (v-model)
placeholderstring'Type a message...'Placeholder text
disabledbooleanfalse
loadingbooleanfalseShows stop button when true
rowsnumber1
autoResizebooleantrue
submitShortcut'enter' | 'mod+enter''enter''enter' submits (Shift+Enter newline); 'mod+enter' submits on ⌘/Ctrl+Enter (Enter newline)

Slots

  • prefix
  • attachments-area
  • input
  • actions
  • send-icon
  • stop-icon
  • suffix