# XWUIInputChat

The chat message composer: an auto-resizing `textarea` (grows from `minRows` to `maxRows`) with a paperclip attach button (`showFileButton`), a send button (`showSendButton`), and an optional mic button (`showVoiceButton`) that takes the send slot while the field is empty. Files can be staged via the picker, clipboard paste, or drag-drop (`allowPasteAttach`), filtered by `accept`, `maxAttachments`, and `maxAttachmentBytes`, and shown as removable chips with image thumbnails. Enter sends (Shift+Enter newlines); `onSend(text)`, `onSendMessage({ text, attachments })`, `onFileAttach`, `onAttachmentReject`, `onTypingChange` (throttled by `typingIdleMs`), and `onVoiceRecord` expose the events, and the initial text comes from `data.value`.

## Basic Usage

The composer seeded with `value: "Sample value"`, showing the auto-resizing textarea, paperclip attach button, and send button.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Message composer pre-filled with sample text, with the default attach and send buttons.
```

## Real World

The composer instantiated with empty data inside a realistic application container, using all default options.

```example
file: examples/RealWorld.ts
html: examples/RealWorld.html
title: Real World
description: InputChat mounted with default config in a realistic app context.
```

## Voice Composer

A Telegram-style composer with showVoiceButton on so a mic takes the send slot while empty, wiring onSend, onVoiceRecord, and onTypingChange. Stop opens a review row (live waveform, playback, duration) with Discard / Re-record / Send - onVoiceRecord fires only once the reviewer sends, not the instant capture stops.

```example
file: examples/VoiceComposer.ts
html: examples/VoiceComposer.html
title: Voice Composer
description: Composer with a voice-record mic button plus send, voice, and typing-change handlers.
```

## Image Attach

A photo-share composer that filters attachments to images and caps their count and size, surfacing refusals via onAttachmentReject.

```example
file: examples/ImageAttach.ts
html: examples/ImageAttach.html
title: Image Attach
description: Image-only composer with accept, maxAttachments, and maxAttachmentBytes limits and an onAttachmentReject handler.
```

```api
```
