A chat bubble renders a single message in a conversation thread. Received messages sit left with a neutral fill; sent messages sit right with the primary fill.
DefaultRendered example
Penguin UI
Hi there! How can I assist you today?
I accidentally deleted some important files. Can they be recovered?
Penguin UI
I'm sorry to hear that. Let me guide you through the process to resolve it.
Usage Example
@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Received,SenderName:"Penguin UI",Message:"Hi there! How can I assist you today?",})@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Sent,Message:"I accidentally deleted some important files. Can they be recovered?",})
With Timestamp
Set Timestamp (e.g. "11:32 AM") to show the send time next to the sender. It surfaces in the header line, so pair it with a SenderName.
With TimestampRendered example
Ada11:32 AM
Did the deploy finish?
You11:33 AM
Just went green a minute ago.
With Timestamp
@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Received,SenderName:"Ada",Timestamp:"11:32 AM",Message:"Did the deploy finish?",})@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Sent,SenderName:"You",Timestamp:"11:33 AM",Message:"Just went green a minute ago.",})
With Avatar
Set ShowAvatar: true to render the avatar column. Provide AvatarInitials + AvatarTone for a colored fallback, or AvatarSrc for an image. The avatar flips to the correct side automatically for sent messages.
With AvatarRendered example
AL
Welcome to the team channel!
ME
Thanks, glad to be here.
With Avatar
@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Received,Message:"Welcome to the team channel!",ShowAvatar:true,AvatarInitials:"AL",AvatarTone:avatar.ToneInfo,})@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Sent,Message:"Thanks, glad to be here.",ShowAvatar:true,AvatarSrc:"/assets/avatar.jpg",})
Sender Name & Status
SenderName labels a received message. Status renders beneath a bubble; use Sending, Delivered, or Seen on sent messages to convey delivery state.
Sender Name & StatusRendered example
Grace
Pushed the fix — can you review?
On it now.
Delivered
LGTM, approved.
Seen
Sender Name & Status
@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Received,SenderName:"Grace",Message:"Pushed the fix — can you review?",})@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Sent,Message:"On it now.",Status:chatbubble.StatusDelivered,})@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Sent,Message:"LGTM, approved.",Status:chatbubble.StatusSeen,})
Grouped (Consecutive)
Set Grouped: true on consecutive messages from the same sender. Grouped bubbles tighten the spacing and suppress the avatar + name so a run of messages reads as one block.
Grouped (Consecutive)Rendered example
AL
Ada
I split the work into three slices.
Taking the first one myself.
Can you grab the second?
Grouped (Consecutive)
@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Received,SenderName:"Ada",ShowAvatar:true,AvatarInitials:"AL",AvatarTone:avatar.ToneInfo,Message:"I split the work into three slices.",})@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Received,Grouped:true,Message:"Taking the first one myself.",})@chatbubble.ChatBubble(chatbubble.Config{Side:chatbubble.Received,Grouped:true,Message:"Can you grab the second?",})
Typing Indicator
@chatbubble.TypingIndicator renders a received-style row with three animated dots and no text — show it while a sender composes a reply.
Goshtoso can store preferences and demo state in your browser. Some examples use cookies and IndexedDB to persist local demo state. There is no analytics, advertising, or third-party tracking. You can use the site without storage, but preferences and some examples will reset or stop persisting. Details in our Privacy Policy.