WRNexus UI
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

Hi Maya, is the new dashboard ready to review?

Yes! I have shared the latest version with you.

Thanks, I will take a look this afternoon.

Great. The release notes are attached too.

One more screenshot coming up.

Uploading the final export now.

Here is the invoice PDF.

Not delivered
Component code
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.
Component props11 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Production default

Balanced spacing, hierarchy, and content for the most common product workflow.

01
Live preview

Hi Maya, is the new dashboard ready to review?

Yes! I have shared the latest version with you.

Thanks, I will take a look this afternoon.

Great. The release notes are attached too.

One more screenshot coming up.

Uploading the final export now.

Here is the invoice PDF.

Not delivered
Component usage.wrn
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

Compact application

A tighter variation for dashboards, side panels, tables, and operational interfaces.

02
Live preview

Hi Maya, is the new dashboard ready to review?

Yes! I have shared the latest version with you.

Thanks, I will take a look this afternoon.

Great. The release notes are attached too.

One more screenshot coming up.

Uploading the final export now.

Here is the invoice PDF.

Not delivered
Component usage.wrn
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

Rich configuration

A more expressive variation using additional data, stronger emphasis, and optional states.

03
Live preview

Hi Maya, is the new dashboard ready to review?

Yes! I have shared the latest version with you.

Thanks, I will take a look this afternoon.

Great. The release notes are attached too.

One more screenshot coming up.

Uploading the final export now.

Here is the invoice PDF.

Not delivered
Component usage.wrn
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.
Declarative handlers.wrn
<ChatBubble
  @action='console.log(payload)'
  @messageClick='console.log(payload)'
  @avatarClick='console.log(payload)'
  @linkClick='console.log(payload)'
/>
Direct output handlers.js
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.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
titlestring""No
descriptionstring""No
itemsunknown[][]No
oneSidedbooleanfalseNo
showAvatarsbooleanfalseNo
showMetadatabooleanfalseNo
ariaLabelstring"Conversation"No
variantstring"default"No
classstring""No