How to build an accessible ChatBubble in React

Pure layout component with role="none". Wrap a list of ChatBubble elements in an element with role="log" and aria-live="polite" to announce new messages to screen readers.

When to use a ChatBubble

When not to use it

Accessibility

Role none, verified at WCAG 2.2-AA.

Common mistakes

Avoid: Using ChatBubble for notification cards or feed items

Prefer: <Card> or <Alert> for non-conversational content

ChatBubble implies a back-and-forth conversation; use Card for standalone content pieces

Example

<ChatBubble side="start" name="Alice" time="10:42 AM">Hey, how are you?</ChatBubble>

See the full ChatBubble reference →