Hi Maya, is the new dashboard ready to review?
Base component
Chat Bubble
Theme-aware, responsive chat bubble component.
11 props1 slots4 outputsTheme readyResponsive
Interactive playground
Configure Chat Bubble
Change any prop and inspect the server-rendered component immediately.
Live preview
page ChatBubbleExample {
state items = [
{
"text": "Hi Maya, is the new dashboard ready to review?",
"direction": "incoming",
"timestamp": "10:24"
},
{
"text": "Yes! I have shared the latest version with you.",
"direction": "outgoing",
"timestamp": "10:25",
"receipt": "read"
},
{
"text": "Thanks, I will take a look this afternoon.",
"direction": "incoming",
"timestamp": "10:26"
},
{
"text": "Great. The release notes are attached too.",
"direction": "outgoing",
"timestamp": "10:27",
"receipt": "delivered"
},
{
"text": "One more screenshot coming up.",
"direction": "outgoing",
"timestamp": "10:28",
"receipt": "sent"
},
{
"text": "Uploading the final export now.",
"direction": "outgoing",
"timestamp": "10:29",
"receipt": "sending"
},
{
"text": "Here is the invoice PDF.",
"direction": "outgoing",
"timestamp": "10:30",
"receipt": "failed",
"status": "Not delivered",
"actionLabel": "Retry"
}
]
view {
<ChatBubble
items="{items}"
showMetadata="true"
/>
}
}
Event outputInteract with the preview to inspect the typed
payload.Live examples
Designed for real product surfaces
Compare configurations and resize the browser to check responsive behavior.
Recommended
01
Production default
Balanced spacing, hierarchy, and content for the most common product workflow.
Live preview
page ChatBubbleExample {
state items = [
{
"text": "Hi Maya, is the new dashboard ready to review?",
"direction": "incoming",
"timestamp": "10:24"
},
{
"text": "Yes! I have shared the latest version with you.",
"direction": "outgoing",
"timestamp": "10:25",
"receipt": "read"
},
{
"text": "Thanks, I will take a look this afternoon.",
"direction": "incoming",
"timestamp": "10:26"
},
{
"text": "Great. The release notes are attached too.",
"direction": "outgoing",
"timestamp": "10:27",
"receipt": "delivered"
},
{
"text": "One more screenshot coming up.",
"direction": "outgoing",
"timestamp": "10:28",
"receipt": "sent"
},
{
"text": "Uploading the final export now.",
"direction": "outgoing",
"timestamp": "10:29",
"receipt": "sending"
},
{
"text": "Here is the invoice PDF.",
"direction": "outgoing",
"timestamp": "10:30",
"receipt": "failed",
"status": "Not delivered",
"actionLabel": "Retry"
}
]
view {
<ChatBubble
items="{items}"
showMetadata="true"
/>
}
}
Dense UI
02
Compact application
A tighter variation for dashboards, side panels, tables, and operational interfaces.
Live preview
page ChatBubbleExample {
state items = [
{
"text": "Hi Maya, is the new dashboard ready to review?",
"direction": "incoming",
"timestamp": "10:24"
},
{
"text": "Yes! I have shared the latest version with you.",
"direction": "outgoing",
"timestamp": "10:25",
"receipt": "read"
},
{
"text": "Thanks, I will take a look this afternoon.",
"direction": "incoming",
"timestamp": "10:26"
},
{
"text": "Great. The release notes are attached too.",
"direction": "outgoing",
"timestamp": "10:27",
"receipt": "delivered"
},
{
"text": "One more screenshot coming up.",
"direction": "outgoing",
"timestamp": "10:28",
"receipt": "sent"
},
{
"text": "Uploading the final export now.",
"direction": "outgoing",
"timestamp": "10:29",
"receipt": "sending"
},
{
"text": "Here is the invoice PDF.",
"direction": "outgoing",
"timestamp": "10:30",
"receipt": "failed",
"status": "Not delivered",
"actionLabel": "Retry"
}
]
view {
<ChatBubble
items="{items}"
showMetadata="true"
/>
}
}
Extended
03
Rich configuration
A more expressive variation using additional data, stronger emphasis, and optional states.
Live preview
page ChatBubbleExample {
state items = [
{
"text": "Hi Maya, is the new dashboard ready to review?",
"direction": "incoming",
"timestamp": "10:24"
},
{
"text": "Yes! I have shared the latest version with you.",
"direction": "outgoing",
"timestamp": "10:25",
"receipt": "read"
},
{
"text": "Thanks, I will take a look this afternoon.",
"direction": "incoming",
"timestamp": "10:26"
},
{
"text": "Great. The release notes are attached too.",
"direction": "outgoing",
"timestamp": "10:27",
"receipt": "delivered"
},
{
"text": "One more screenshot coming up.",
"direction": "outgoing",
"timestamp": "10:28",
"receipt": "sent"
},
{
"text": "Uploading the final export now.",
"direction": "outgoing",
"timestamp": "10:29",
"receipt": "sending"
},
{
"text": "Here is the invoice PDF.",
"direction": "outgoing",
"timestamp": "10:30",
"receipt": "failed",
"status": "Not delivered",
"actionLabel": "Retry"
}
]
view {
<ChatBubble
items="{items}"
showMetadata="true"
/>
}
}
Component outputs
Receive every typed component output
Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.
@actionFires when the component's primary or item action is activated.@messageClickFires when the component emits the messageClick event.@avatarClickFires when the component emits the avatarClick event.@linkClickFires when the component emits the linkClick event.<ChatBubble
@action='console.log(payload)'
@messageClick='console.log(payload)'
@avatarClick='console.log(payload)'
@linkClick='console.log(payload)'
/>import { registerOutputHandler } from "@wrnexus/csr/outputs"
const component = document.querySelector("[data-ui-component=\"ChatBubble\"], [data-component=\"ChatBubble\"]")
if (component) registerOutputHandler(component, "action", (payload) => {
console.log("action", payload)
})
if (component) registerOutputHandler(component, "messageClick", (payload) => {
console.log("messageClick", payload)
})
if (component) registerOutputHandler(component, "avatarClick", (payload) => {
console.log("avatarClick", payload)
})
if (component) registerOutputHandler(component, "linkClick", (payload) => {
console.log("linkClick", payload)
})Component API
Props and configuration
All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|---|---|---|
size | string | "default" | No |
color | string | "primary" | No |
title | string | "" | No |
description | string | "" | No |
items | unknown[] | [] | No |
oneSided | boolean | false | No |
showAvatars | boolean | false | No |
showMetadata | boolean | false | No |
ariaLabel | string | "Conversation" | No |
variant | string | "default" | No |
class | string | "" | No |