@bndynet/ichat-input
v3.3.1
Published
Lit 3 chat input Web Component: auto-resize textarea, send button, streaming cancel, and keyboard shortcuts.
Downloads
1,079
Maintainers
Readme
@bndynet/ichat-input
Lit Web Component for chat text input. Auto-resize textarea, send button, streaming cancel, and keyboard shortcuts.
Install
npm install @bndynet/ichat-inputComponent
| Tag | Description |
| ---------------- | -------------------------------------------------------- |
| <i-chat-input> | Multi-line auto-resize textarea with send/cancel buttons |
Features
- Auto-resize textarea
- Enter to send, Shift+Enter for newline
- Send / Cancel buttons
- Streaming stop support
busystate that blocks send and voice input while preserving draft editing- i18n-ready
Busy and streaming
Use busy for the submission lock and streaming to select the Cancel button:
const input = document.querySelector("i-chat-input");
input.busy = true; // send/voice are locked; textarea remains editable
input.streaming = true; // Cancel replaces SendWhen <i-chat-input> is bundled inside <i-chat>, these properties are wired automatically.
License
MIT
