Skip to content

Chat Message List

@astryxdesign/core v0.7.1 · ChatMessageList

Props ​

PropTypeDefaultDescription
align'top' | 'bottom''bottom'Vertical alignment when the list is shorter than its container. 'bottom' fills the free space with a spacer, so a short conversation sits just above the composer; 'top' leaves the spacer out, so messages start at the top. A list that already overflows scrolls the same way in both modes.
densityChatDensity'balanced'Visual density: 'compact', 'balanced', or 'spacious'. Flows to child messages through context.
gapSpacingStepdensity valueGap between top-level rows, on the spacing scale. Overrides the density gap without changing padding.
scrollToTopAction() => Promise<void>—Runs when a sentinel at the top of the list enters the scroll parent. Use it to load older messages. A spinner stays at the top until the promise settles.
isStreamingbooleanfalseMarks the log aria-busy while an assistant message is still growing, so a screen reader waits and announces the finished message once.
labelstringlocalized “Messages”Accessible name of the log.

Slots ​

  • default: message rows, usually ChatMessage and ChatSystemMessage.
  • emptyState: shown when the default slot is omitted.
  • empty: alias of emptyState.

Exposed ​

  • element: the root <div role="log"> element.