On this page
Message
Displays conversation messages with optional avatars, headers, and footers.
Overview
Copy the source into your project. Import the parts that you need. Styles use local StyleX declarations and shared theme tokens. You can change the source without a wrapper or replacement package.
Preview
Basic conversation
Installation
Run the init command from your project root first. The CLI configures StyleX and installs shared files and dependencies.
Run from your project root. The CLI installs required components, shared files, and packages. Previews may need additional components. The CLI keeps existing files.
Usage
Displays conversation messages with optional avatars, headers, and footers.
Import from the local file installed by the CLI.
Open the preview source for a copyable example.
Examples
Copy the example you want to use. Copy the shared source into the same directory.
Avatar
Place AvatarImage before AvatarFallback. Use logical start for received messages and logical end for sent messages.
Group
Group consecutive messages from one sender. Leave the earlier avatar slots empty to keep the messages aligned.
Header and footer
Put the sender name and time in MessageHeader. Put delivery or read status in MessageFooter.
Actions
Place copy, reaction, and retry buttons in MessageFooter. Give each icon-only button an accessible name.
Attachment
Put images and files in MessageContent. Give informative images alternative text. Name each download link.
Status updates
Give progress updates a text label. Use a status region to announce updates to assistive technology.
Shared example source
Save this file as message-demo-parts.tsx.
API reference
The generator reads the component TypeScript source. Only component and Ark UI props appear below. The Required column shows whether you must supply a property. It does not mean you must use the component.

