Layout guide
Grid, flexbox, and spacing utilities.
Components Data display
Present an item, its description, and an optional status in one compact row.
Grid, flexbox, and spacing utilities.
Use Title and Description for the primary content. Add Status for a secondary label. If the item has a destination, set Href to render the title as a link.
Register item with Head and pass its properties to Render. Go setup guide
err := mono.UI.Render(w, "item", mono.Props{
"Description": "Grid, flexbox, and spacing utilities.",
"Href": "/docs/grid-template-columns.html",
"Status": "Reference",
"Title": "Layout guide",
})<article data-mono="item" id="demo-item" class="mu-panel mu-row">
<div><h3 class="mu-label"><a href="/docs/grid-template-columns.html">Layout guide</a></h3><p class="mu-muted mu-small">Grid, flexbox, and spacing utilities.</p></div>
<span class="mu-badge">Reference</span>
</article><article data-mono="item" id="{{.ID}}" class="mu-panel mu-row">
<div><h3 class="mu-label">{{if .Href}}<a href="{{.Href}}">{{.Title}}</a>{{else}}{{.Title}}{{end}}</h3><p class="mu-muted mu-small">{{.Description}}</p></div>
{{with .Status}}<span class="mu-badge">{{.}}</span>{{end}}
</article>[data-mono="item"] { justify-content:space-between; gap:1rem; }
[data-mono="item"] a { color:inherit; text-decoration:underline; text-underline-offset:.2rem; }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="./item.css">Run this command from the Mono checkout. Set -out to the component directory in your application.
go run ./cmd/mono-ui add -out ./components item{
"Description": "Grid, flexbox, and spacing utilities.",
"Href": "/docs/grid-template-columns.html",
"Status": "Reference",
"Title": "Layout guide"
}