Messages
Chat messages, from a single bubble up to a run of messages from one sender. One is a dialogue you can click through.
Message
Start for the other side, end for the reader. The avatar sits level with the bubble, not the footer.
startProps of start
<Message author="Greg Heffley" avatar={image("/_astro/greg.B9OwiVM9.jpg")} time="09:41" datetime="2026-10-09T09:41">
<p>Did you finish the history project yet?</p>
</Message>endProps of end
<Message align="end" time="09:42" datetime="2026-10-09T09:42">
<p>Not even close. Rowley spilled juice on the poster.</p>
</Message>statusProps of status
<Message align="end" status="Read">
<p>Here's the <a href="#message">draft</a>, tell me what you think.</p>
</Message>ghost-actionsProps of ghost-actions
<Message author="Rowley Jefferson" avatar variant="ghost" time="16:20" datetime="2026-10-09T16:20">
<p>New Zoo-Wee Mama strip is up on the class board! This one finally has a side…
<Button slot="footer" size="icon-sm" variant="ghost" tone="neutral" aria-label="Reply"><Icon name="lucide:reply" /></Button>
<Button slot="footer" size="icon-sm" variant="ghost" tone="neutral" aria-label="Add reaction"><Icon name="lucide:smile-plus" /></Button>
<Button slot="footer" size="icon-sm" variant="ghost" tone="neutral" aria-label="More actions"><Icon name="lucide:ellipsis" /></Button>
</Message>typinganimatedProps of typing
<Message author="Greg Heffley" avatar={image("/_astro/greg.B9OwiVM9.jpg")} typing />errorProps of error
<Message align="end" variant="tinted" tone="destructive" status="Not delivered"><p>Can you send me your notes?</p></Message>attachmentProps of attachment
<Message author="Greg Heffley" avatar={image("/_astro/greg.B9OwiVM9.jpg")} time="09:44">
<p>Found the old one, use this.</p>
<Attachment title="history-poster.pdf" icon="lucide:file-text" style="margin-top: var(--space-sm)">PDF · 2.4 MB</Attachment>
</Message>long-wordProps of long-word
<Message align="end">
<p>https://example.com/an/extremely/long/link/that/has/no/spaces/to/break/at/wh…
</Message>Bubbles
Ghost drops the frame and the 80% width cap.
solid-neutralProps of solid-neutral
<MessageBubble variant="solid" tone="neutral"><p>Solid bubble, neutral tone.</p></MessageBubble>solid-primaryProps of solid-primary
<MessageBubble variant="solid" tone="primary"><p>Solid bubble, primary tone.</p></MessageBubble>tinted-neutralProps of tinted-neutral
<MessageBubble variant="tinted" tone="neutral"><p>Tinted bubble, neutral tone.</p></MessageBubble>tinted-primaryProps of tinted-primary
<MessageBubble variant="tinted" tone="primary"><p>Tinted bubble, primary tone.</p></MessageBubble>outline-neutralProps of outline-neutral
<MessageBubble variant="outline" tone="neutral"><p>Outline bubble, neutral tone.</p></MessageBubble>outline-primaryProps of outline-primary
<MessageBubble variant="outline" tone="primary"><p>Outline bubble, primary tone.</p></MessageBubble>ghost-neutralProps of ghost-neutral
<MessageBubble variant="ghost" tone="neutral"><p>Ghost bubble, neutral tone.</p></MessageBubble>ghost-primaryProps of ghost-primary
<MessageBubble variant="ghost" tone="primary"><p>Ghost bubble, primary tone.</p></MessageBubble>Groups
The first message names the sender; the last carries the avatar (the first, for ghost messages).
startProps of start
<MessageGroup>
<Message author="Greg Heffley" avatar={image("/_astro/greg.B9OwiVM9.jpg")} time="18:02"><p>Hey.</p></Message>
<Message author="Greg Heffley" avatar={image("/_astro/greg.B9OwiVM9.jpg")} time="18:02">
<p>Are you coming to the Halloween party?</p>
</Message>
<Message author="Greg Heffley" avatar={image("/_astro/greg.B9OwiVM9.jpg")} time="18:02"><p>Mom says I can go if you go.</p></Message>
</MessageGroup>ghostProps of ghost
<MessageGroup>
<Message author="Rodrick Heffley" avatar variant="ghost" time="07:15">
<p>Who took the last juice box from the fridge?</p>
</Message>
<Message author="Rodrick Heffley" avatar variant="ghost" time="07:15"><p>It was labeled.</p></Message>
<Message author="Rodrick Heffley" avatar variant="ghost" time="07:15"><p>In marker.</p></Message>
</MessageGroup>endProps of end
<MessageGroup>
<Message align="end"><p>Maybe.</p></Message>
<Message align="end">
<p>Only if we skip the haunted house.</p>
</Message>
</MessageGroup>Interactive
Pick a reply to walk the dialogue tree. Without JS, only the opening shows. Rodrick's branches run page-wide actions.
defaultProps of default
<InteractiveMessage tree={{ messages: ["Hey Greg!", "Want to come over and play Twisted Wizard?"], options: [{…}, {…}] }} author="Rowley Jefferson" />page-actionsProps of page-actions
<InteractiveMessage tree={{ messages: ["What do you want, dweeb?"], options: [{…}, {…}] }} author="Rodrick Heffley" />capped-heightProps of capped-height
<InteractiveMessage tree={{ messages: ["Hey Greg!", "Want to come over and play Twisted Wizard?"], options: [{…}, {…}] }} author="Greg Heffley" avatar={image("/_astro/greg.B9OwiVM9.jpg")} style="max-block-size: 18rem" />