patterns/chat library

Classes

UiChatAttachmentTray
Inline attachment staging, intended for UiChatComposer's attachmentShelf. A single media preview keeps its natural ratio, batches scroll horizontally, and document rows scroll vertically. The conversation retains visible space.
UiChatComposer
Chat input row with attachment slot and send action.
UiChatComposerActions
Active composer mode; the host owns commands and recording/selection state.
UiChatDraftAttachment
A caller-owned unsent attachment. Media rendering and inspection stay with the application; omit mediaBuilder for a compact file/recording row.
UiChatHeader
Compact centered conversation title, with leading navigation and trailing avatar/actions. Grows with text scaling; callers provide localized labels and accessible action widgets.
UiChatMessage
A complete message row. Domain content, receipt derivation and reply targets stay application-owned; the kit owns spacing, avatar reservation, selection, bubble geometry and directional swipe-to-reply.
UiChatMessageGrouping
Neighbor-derived presentation shared by text and media. Neighbors are in chronological order; pass null across non-message events.
UiChatScaffold
Conversation page that owns safe areas, chrome measurement and IME avoidance.
UiChatTimeline
Conversation history composition using the existing anchor-preserving scroller. Items are oldest-first and retain their application IDs. Supply localized loading/empty/error and typing surfaces; state is application-owned.
UiChatTimelineEntry
An application message or event projected into presentation data. Event entries use isMessage false and break sender runs without losing their stable history ID. The builder receives ready-to-use grouping.
UiChatWorkspace<T>
Chat uses the kit's adaptive master/detail navigation directly: root routes on phones, overlay detail on tablets, and inbox/detail panes on desktop. Keeping the same controller preserves selection and navigation contracts.
UiConversationLayout
A conversation viewport with floating header and composer surfaces.
UiMessageBubble
Chat bubble surface.

Enums

UiChatReceiptVisibility
UiMessageAuthor
Direction of a chat message.
UiMessageStatus
Ephemeral state flag for streaming/pending messages.

Functions

uiChatShowsReceipt({required bool outgoing, required bool latestOutgoing, required UiMessageDeliveryStatus status, UiChatReceiptVisibility visibility = UiChatReceiptVisibility.latestOutgoing}) bool
Selects presentation only; the application derives delivery status.