Displays a message in a conversation, with optional avatar, header, footer, and alignment.
❯buridan add messageUse the following to build the Message component.
from components.ui.message import messageFor manual installation, copy each of the source codes below in their respective locations.
The Message component lays out a single message in a conversation. It handles the avatar, alignment, header, and footer around the message surface.
For AI apps, you can render reasoning steps, tool calls and assistant messages using the Message component.
Use message.avatar to render an avatar next to the message. Set align="end" on the message to align the avatar to the end of the message.
Props used: align on message.root.
Use message.group to stack consecutive messages from the same sender. Render an empty message.avatar on the earlier messages to keep them aligned with the avatar on the last one.
Props used: none required beyond default message.group composition.
Use message.header for a sender name and message.footer for metadata such as a delivery or read status.
Props used: none required beyond default message.header/message.footer composition.
Place message-level actions in message.footer, such as copy, retry, or feedback buttons.
Props used: none required — place button(...) inside message.footer.
Use the Attachment with the messages to displays a file or image attachment with media, metadata, upload state, and actions.
Props used: see the Attachment docs for attachment-specific props.
Message is a presentational layout wrapper. Accessibility comes from the content you place inside it.
Action buttons in message.footer are usually icon-only, so give each one an aria-label.
message.footer(
button(
hi("Refresh03Icon"),
variant="ghost",
size="sm",
title="Retry",
aria_label="Retry",
),
)
For in-progress messages, use a Marker with role="status" so assistive tech announces the update as it appears.
message.root(
message.content(
marker.root(
marker.icon(spinner()),
marker.content("Compacting conversation"),
role="status",
),
),
)
The message row wrapper.
Groups consecutive messages from the same sender.
The avatar slot, aligned to the bottom of the message. When the message has a message.footer, the avatar shifts up to stay aligned with the message surface instead of the footer.
Wraps the header, message surface, and footer.
Displays content above the message, such as a sender name. Stays aligned to the start regardless of align.
Displays content below the message, such as status or actions. Aligns to the message side.