ChatPromptSubmit
Handle chat submit, stop, and retry actions with a status-aware control for prompt workflows.
ready
streaming
submitted
error
Installation
pnpm dlx shadcn-vue@latest add "https://ui.stackhacker.io/r/chat-prompt-submit.json"
Usage
<script setup lang="ts">
import { ChatPromptSubmit } from '@/components/ui/chat-prompt-submit'
</script>
<template>
<ChatPromptSubmit status="ready" @stop="handleStop" @reload="handleReload" />
</template>Examples
Default
ready
streaming
submitted
error
API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
status | 'ready' | 'streaming' | 'submitted' | 'error' | 'ready' | Current chat status. Controls the displayed icon. |
disabled | boolean | false | Disable the button. |
class | string | — | Additional CSS classes. |
Emits
| Event | Description |
|---|---|
stop | Emitted when clicked during streaming or submitted status. |
reload | Emitted when clicked during error status. |

