Components Data display
Message
Present a complete message with an author, timestamp, body, and optional delivery state.
Usage
Use Author for the sender and Text for the message. Supply DateTime in HTML datetime format with a readable DisplayTime. Status can hold a delivery or review state.
Register message with Head and pass its properties to Render. Go setup guide
Go usage
err := mono.UI.Render(w, "message", mono.Props{
"Author": "Ada Kim",
"DateTime": "2026-03-12T10:42:00+08:00",
"DisplayTime": "10:42 AM",
"Initials": "AK",
"Status": "Delivered",
"Text": "I checked the new title spread. The binding margin has enough room now.",
})Rendered HTML
<article data-mono="message" id="demo-message" class="mu-panel" aria-labelledby="demo-message-author">
<span aria-hidden="true" class="mu-message-initials">AK</span>
<div class="mu-stack">
<header class="mu-row"><h3 class="mu-label" id="demo-message-author">Ada Kim</h3><time class="mu-small mu-muted" datetime="2026-03-12T10:42:00+08:00">10:42 AM</time></header>
<p class="mu-message-text">I checked the new title spread. The binding margin has enough room now.</p>
<span class="mu-small mu-muted">Delivered</span>
</div>
</article>Go template
<article data-mono="message" id="{{.ID}}" class="mu-panel" aria-labelledby="{{.ID}}-author">
{{with .Initials}}<span aria-hidden="true" class="mu-message-initials">{{.}}</span>{{end}}
<div class="mu-stack">
<header class="mu-row"><h3 class="mu-label" id="{{.ID}}-author">{{.Author}}</h3>{{with .DisplayTime}}<time class="mu-small mu-muted" {{if $.DateTime}}datetime="{{$.DateTime}}"{{end}}>{{.}}</time>{{end}}</header>
<p class="mu-message-text">{{.Text}}</p>
{{with .Status}}<span class="mu-small mu-muted">{{.}}</span>{{end}}
</div>
</article>Component CSS
[data-mono="message"] { display:flex; align-items:flex-start; gap:.7rem; }
[data-mono="message"] .mu-message-initials { display:grid; place-items:center; flex:none; width:2.1rem; height:2.1rem; background:#222; color:white; border-radius:50%; font:600 .75rem/1 system-ui,sans-serif; }
[data-mono="message"] .mu-stack { gap:.35rem; min-width:0; }
[data-mono="message"] header { flex-wrap:wrap; }
[data-mono="message"] .mu-message-text { white-space:pre-line; overflow-wrap:anywhere; }Use the HTML in a static site
Copy the rendered HTML above. Download these assets into the same folder as your page, then add the tags below to its head.
<link rel="stylesheet" href="./base.css">
<link rel="stylesheet" href="./message.css">Copy into your project
Run this command from the Mono checkout. Set -out to the component directory in your application.
go run ./cmd/mono-ui add -out ./components messageExample properties (JSON)
{
"Author": "Ada Kim",
"DateTime": "2026-03-12T10:42:00+08:00",
"DisplayTime": "10:42 AM",
"Initials": "AK",
"Status": "Delivered",
"Text": "I checked the new title spread. The binding margin has enough room now."
}