Skip to content
Astryx
DocsComponentsTemplatesThemesPlayground
Search
Switch to dark mode
Community
GitHub
Get started
Type to search
↑↓Navigate↵SelectEscClose
Components
Overview
App Shell
App Shell
useXDSAppShellMobile
Aspect Ratio
Avatar
Avatar
Avatar Group
Avatar Group Overflow
Avatar Status Dot
Badge
Banner
Blockquote
Breadcrumbs
Breadcrumb Item
Breadcrumbs
Button
Button
Button Group
Icon Button
Toggle Button
Toggle Button Group
Calendar
Card
Card
Clickable Card
Selectable Card
Carousel
Chat
Chat Composer
Chat Composer Drawer
Chat Composer Input
Chat Composer Token Element
Chat Dictation Button
Chat Layout
Chat Layout Scroll Button
Chat Message
Chat Message Bubble
Chat Message List
Chat Message Metadata
Chat Send Button
Chat System Message
Chat Tokenized Text
Chat Tool Calls
Checkbox
Checkbox Input
Checkbox List
Checkbox List Item
Citation
Code
Code Block
Collapsible
Collapsible
Collapsible Group
useXDSCollapsible
Command Palette
Command Palette
Command Palette Empty
Command Palette Footer
Command Palette Group
Command Palette Input
Command Palette Item
Command Palette List
Context Menu
Context Menu
Context Menu Item
Date Input
Date Input
Date Range Input
Date Time Input
Dialog
Alert Dialog
Dialog
Dialog Header
useXDSImperativeAlertDialog
useXDSImperativeDialog
Divider
Dropdown Menu
Dropdown Menu
Dropdown Menu Item
Empty State
Field
Field
Field Label
Field Status
Input Group
Input Group Text
File Input
Heading
Hover Card
Hover Card
useXDSHoverCard
Icon
Item
Kbd
Layout
Center
Form Layout
Grid
Grid Span
H Stack
Layout
Layout Content
Layout Footer
Layout Header
Layout Panel
Section
Stack Item
V Stack
Lightbox
Link
List
List
List Item
Markdown
Metadata List
Metadata List
Metadata List Item
More Menu
Navigation
Mobile Nav
Mobile Nav Toggle
Nav Heading Menu
Nav Icon
Side Nav
Side Nav Collapse Button
Side Nav Heading
Side Nav Item
Side Nav Section
Top Nav
Top Nav Heading
Top Nav Item
Top Nav Mega Menu
Top Nav Mega Menu Featured Card
Top Nav Mega Menu Item
Top Nav Menu
Number Input
Outline
Overflow List
Overlay
Pagination
Popover
Popover
useXDSPopover
Power Search
Progress Bar
Radio
Radio List
Radio List Item
Resizable
Resize Handle
useXDSResizable
Segmented Control
Segmented Control
Segmented Control Item
Selector
Multi Selector
Selector
Selector Option
Skeleton
Slider
Spinner
Status Dot
Switch
Table
Table
Table Cell
Table Header Cell
Table Row
useXDSTableColumnSettings
useXDSTableFiltering
useXDSTableFilterState
useXDSTablePagination
useXDSTableSelection
useXDSTableSelectionState
useXDSTableSortable
Tabs
Tab
Tab List
Tab Menu
Text
Text Area
Text Input
Thumbnail
Time Input
Timestamp
Toast
Toast
useXDSToast
Token
Tokenizer
Toolbar
Tooltip
Tooltip
useXDSTooltip
Tree List
Typeahead
Base Typeahead
Typeahead
Typeahead Item
Utilities
Layer Provider
Link Provider
Media Theme
Syntax Theme
Theme
useClickableContainer
useEntryAnimation
useFocusTrap
useGridFocus
useImageMode
useInputContainer
useListFocus
useMediaQuery
useOverflow
useScrollLock
useScrollOverflow
useXDSLayer
useXDSStreamingText
useXDSTheme
Copyright ©2026 Meta Platforms, Inc.
Terms of use
Privacy policy
GitHub pages
Chat Message Bubble@xds/core v0.0.14 · XDSChatMessageBubble

Usage

XDSChatMessageList is the scrollable container for chat messages. It renders children in a flex column with role="log" for accessibility, provides density context to child messages, and supports infinite scroll for loading older messages. Use it inside XDSChatLayout for full-page chat with auto-scroll and composer docking, or standalone for embedded message panels.
ts
import {XDSChatMessageBubble} from '@xds/core/Chat'

Best practices

GuidancePractices
DoCompose messages using MessageList > Message > Bubble for consistent sender-aware styling and density.
DoSet the density prop to control spacing globally: compact for sidebars, balanced for most views, spacious for long-form reading. Individual messages can override.
DoUse gap when top-level rows are independent (for example, LLM tool events or streamed blocks) and list spacing needs to be tuned separately from density.
DoUse the group prop on bubbles (first, middle, last) when a single sender sends multiple consecutive messages; it tightens corner radius to visually connect them.
DoUse XDSChatSystemMessage with variant="divider" for date separators and default for inline status notices like joins, leaves, or topic changes.
DoPut name on the first bubble and metadata on the last bubble in a message so they align with the bubble's inline padding.
DoProvide an emptyState prop so new users see a clear prompt to start a conversation instead of a blank screen.
DoUse the ghost bubble variant for AI-style responses that show rich content like code blocks or markdown without a visible boundary.
Don'tDon't use XDSChatSystemMessage for sender content; it has no avatar, alignment, or bubble. Use XDSChatMessage with a sender role instead.
Don'tDon't put long or multi-line content in a system message; keep it to a single short sentence. If you need more, use a bubble or a card.
Don'tDon't nest XDSChatMessage inside another XDSChatMessage; each message is a standalone article element with its own sender context.
Don'tDon't apply a fixed height directly on the message list; wrap it in a sized container and let the list fill with flex: 1.
Don'tDon't mix filled and ghost bubble variants within the same sender's messages; pick one style per side and use it consistently.
Don'tDon't place metadata or names on both the bubble and the message wrapper; pick one based on whether the content has a bubble boundary.

Examples

Common configurations, variations, and states.
ChatMessageBubble — Density
Compact, balanced, and spacious density modes side by side. Density controls bubble padding, corner radius, and spacing between grouped bubbles.
ChatMessageBubble — Grouping
Multi-bubble messages using first, middle, and last group positions. Grouped bubbles tighten corner radius on the sender side for a continuous visual flow.
ChatMessageBubble — Metadata
Bubbles with name and metadata slots aligned to bubble padding. Put name on the first bubble and metadata on the last bubble in a message.
ChatMessageBubble — Variants
Filled and ghost bubble variants for both user and assistant senders. Use filled for standard messages and ghost when content needs alignment without a visual boundary.