MessageQuotedPreview

Quoted message card composed inside a MessageItem body for thread and channel quotes.

Preview#

import {
  Avatar,
  MessageQuotedPreview,
  MessageQuotedPreviewAttachment,
  MessageQuotedPreviewAttachments,
  MessageQuotedPreviewAuthor,
  MessageQuotedPreviewAuthorMeta,
  MessageQuotedPreviewAuthorName,
  MessageQuotedPreviewChannel,
  MessageQuotedPreviewContent,
  MessageQuotedPreviewHeader,
  MessageQuotedPreviewLoading,
  MessageQuotedPreviewText,
  MessageQuotedPreviewThread,
  MessageQuotedPreviewTimestamp,
  MessageQuotedPreviewUnavailable,
  Skeleton,
} from "raft-ui";

<MessageQuotedPreview>
  <MessageQuotedPreviewHeader>
    <MessageQuotedPreviewAuthor>
      <Avatar size="xs" type="human" />
      <MessageQuotedPreviewAuthorName />
      <MessageQuotedPreviewAuthorMeta />
    </MessageQuotedPreviewAuthor>
    <MessageQuotedPreviewChannel />
    <MessageQuotedPreviewThread />
    <MessageQuotedPreviewTimestamp />
  </MessageQuotedPreviewHeader>
  <MessageQuotedPreviewContent>
    <MessageQuotedPreviewText />
    <MessageQuotedPreviewAttachments>
      <MessageQuotedPreviewAttachment />
    </MessageQuotedPreviewAttachments>
  </MessageQuotedPreviewContent>
</MessageQuotedPreview>

<MessageQuotedPreviewLoading>
  <Skeleton variant="line" />
</MessageQuotedPreviewLoading>

<MessageQuotedPreviewUnavailable />

Channel thread and attachment#

Use a hash-prefixed channel label for channel permalinks. RenderMessageQuotedPreviewThread only when the permalink includes a thread parent; attachment chips remain in the content region.

Direct message and optional metadata#

Pair the recipient name with DirectMessageIcon for DMs instead of the channel hash. Thread, author meta, and attachments are optional; render those parts only when the quoted target has that data. Use MessageQuotedPreviewLoading while resolving the target and MessageQuotedPreviewUnavailable when it is missing or inaccessible.

Direct-message thread#

DM permalinks pair DirectMessageIcon with the recipient name. A DM can also target a thread reply, in which case render the same thread marker beside that label.

Long excerpt and attachments#

Quoted text clamps to two lines. Wrap attachment chips inMessageQuotedPreviewAttachments after MessageQuotedPreviewTextso files remain visible with a long excerpt.

Archived channel#

Archive policy stays caller-owned. Compose the channel's archived label from an existing Badge alongside the channel and timestamp.

Loading#

Use MessageQuotedPreviewLoading while resolving the target. Its skeleton structure remains caller-owned.

AT
Atlasowner2:26 PM

Unavailable#

Use MessageQuotedPreviewUnavailable when the target is missing or inaccessible. Failure copy stays caller-owned.

AT
Atlasowner2:27 PM
Message unavailable
Message unavailable

API#WIP

PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Quoted message card root. Compose inside MessageItemEmbedded; use render for button/link shells.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Quoted excerpt region for text and optional attachment chips.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Header row for author identity, channel, optional thread, and trailing timestamp.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"span">Header channel or direct-message label. The caller owns icon and label content.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"span">Optional header thread marker. The caller owns its icon and label content.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"span">Inline header identity region, usually composed with Avatar and author fields.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"span">Truncated author display name.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"span">Optional muted author metadata, such as a role or agent description.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"span">Header timestamp aligned to the trailing edge.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Quoted text excerpt, visually clamped to two lines.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"span">One quoted attachment chip. The caller owns its filename or media label.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Wrapping attachment-chip region within the quoted content.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Loading-state container; compose it with Skeleton parts for the target context.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Unavailable/deleted quoted target shell. Failure copy stays consumer-owned.