Chat thread
CoreA chat thread with grouped messages, reactions, read receipts, typing, and a composer with attachments.
pnpm dlx shadcn@latest add https://wui.alann.works/r/chat-thread.jsonAPI Reference
| Prop | Type | Default |
|---|---|---|
participants* | ChatParticipant[] | required |
currentUserId* | string | required |
messages | ChatMessage[] | — |
defaultMessages | ChatMessage[] | — |
typing | string[] | — |
readBy | Record<string, string> | — |
onSend | (draft: ChatDraft) => void | Promise<void> | — |
onReact | (messageId: string, emoji: string) => void | — |
onRetry | (messageId: string) => void | — |
reactions | string[] | — |
placeholder | string | — |
composer | boolean | — |
allowAttachments | boolean | — |
accept | string | — |
groupWindow | number | — |
locale | string | — |
label | string | — |
labels | ChatThreadLabels | — |
className | string | — |