Field notes
Reading the margins
A generous margin gives a page its pace.
Start with a short measure and add space between ideas. Each new paragraph should give the reader a place to pause.
Excerpt from the print workshop journal.
Components Data display
Set an editorial hierarchy for a small, readable block of content.
Field notes
A generous margin gives a page its pace.
Start with a short measure and add space between ideas. Each new paragraph should give the reader a place to pause.
Excerpt from the print workshop journal.
Use Eyebrow, Title, Lead, Body and optional Caption to structure an excerpt. Adapt the heading level to the document that contains the component.
Register typography with Head and pass its properties to Render. Go setup guide
err := mono.UI.Render(w, "typography", mono.Props{
"Body": "Start with a short measure and add space between ideas. Each new paragraph should give the reader a place to pause.",
"Caption": "Excerpt from the print workshop journal.",
"Eyebrow": "Field notes",
"Lead": "A generous margin gives a page its pace.",
"Title": "Reading the margins",
})<article data-mono="typography" id="demo-typography" class="mu-stack">
<p class="mu-small mu-muted">Field notes</p>
<h3>Reading the margins</h3>
<p class="mu-type-lead">A generous margin gives a page its pace.</p>
<p>Start with a short measure and add space between ideas. Each new paragraph should give the reader a place to pause.</p>
<p class="mu-small mu-muted">Excerpt from the print workshop journal.</p>
</article><article data-mono="typography" id="{{.ID}}" class="mu-stack">
{{with .Eyebrow}}<p class="mu-small mu-muted">{{.}}</p>{{end}}
<h3>{{.Title}}</h3>
{{with .Lead}}<p class="mu-type-lead">{{.}}</p>{{end}}
<p>{{.Body}}</p>
{{with .Caption}}<p class="mu-small mu-muted">{{.}}</p>{{end}}
</article>[data-mono="typography"] { max-width:58ch; }
[data-mono="typography"] h3 { margin:0; font:500 clamp(1.65rem,4vw,2.5rem)/1.05 Georgia,serif; letter-spacing:-.05em; }
[data-mono="typography"] .mu-type-lead { font-size:1.12rem; font-weight:550; }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="./typography.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 typography{
"Body": "Start with a short measure and add space between ideas. Each new paragraph should give the reader a place to pause.",
"Caption": "Excerpt from the print workshop journal.",
"Eyebrow": "Field notes",
"Lead": "A generous margin gives a page its pace.",
"Title": "Reading the margins"
}