N/A

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

PropTypeDefaultDescription
status'ready' | 'streaming' | 'submitted' | 'error''ready'Current chat status. Controls the displayed icon.
disabledbooleanfalseDisable the button.
classstringAdditional CSS classes.

Emits

EventDescription
stopEmitted when clicked during streaming or submitted status.
reloadEmitted when clicked during error status.