- Implementation
- PromptBar Props
Common Examples
To use thePromptBar, pass controlled value and onChange. The Send button stays disabled until onSend is wired. Sending is allowed when the draft has trimmed text, unless you override canSend.maxRows (default 8), then it scrolls.Stop
WhileisSending is true, sending is withheld. Wire onStop to surface Stop instead of Send.Voice
The kit does not record or transcribe. WireonStartVoice to show a mic. Drive voiceState ("idle", "listening", "transcribing") from the host. Pass audioLevel (0–1) while listening and transcript while transcribing. Wire onAcceptVoice and onCancelVoice to show those listening-row controls.Disclaimer
Pass a plain-stringdisclaimer to show fine print under the bar. Omit it to hide the line. Rich-text and link support are not ported.Disabled
disabled disables the editor, send, and mic.Built-in action labels (sendLabel, stopLabel, startVoiceLabel, and the voice-row labels) default to English. Override them for localized copy.Accessibility
placeholderis the editor’s accessible name.- While listening,
listeningLabelis announced through a polite live region because the level meter is decorative. - While transcribing,
transcribingLabelnames the row untiltranscriptarrives. - Send, Stop, mic, accept, and cancel use the corresponding label props as accessible names.