One topic on one surface.
Styles: components/button.css, components/field.css, components/item.css, components/card.css, components/copy.css.
Needs moin.js: copy.
A card
A fact, never a sentence about the UI.
With an action
moin deploy my-app
Code
<div class="moin-grid">
<section class="moin-card">
<div class="moin-card-head">
<h2 class="moin-heading">A card</h2>
</div>
<p class="moin-text moin-muted">A fact, never a sentence about the UI.</p>
</section>
<section class="moin-card">
<div class="moin-card-head">
<h2 class="moin-heading">With an action</h2>
<button type="button" class="moin-button">Edit</button>
</div>
<div class="moin-command">
<code>moin deploy my-app</code>
<button type="button" class="moin-copy" data-copy="moin deploy my-app" aria-label="Copy the command">
<i class="moin-icon moin-icon-copy"></i>
</button>
</div>
</section>
<form class="moin-card">
<div class="moin-card-head">
<div class="moin-stack" data-gap="1">
<h2 class="moin-heading">With a line and a foot</h2>
<p class="moin-small moin-muted">Links to the old name stop working.</p>
</div>
</div>
<div class="moin-field">
<label for="demo-card-name">Name</label>
<input id="demo-card-name" class="moin-input" value="my-app">
</div>
<div class="moin-card-foot">
<button type="button" class="moin-button">Cancel</button>
<button type="button" class="moin-button" data-kind="primary">Save</button>
</div>
</form>
<section class="moin-card">
<span class="moin-small moin-muted">Just a number</span>
<span class="moin-number">96 MB</span>
</section>
</div>A list in a card
A list is only rows, the Card is the surface. A moin-list right inside a card runs almost to its edge. Its words line up with the card’s, and the light of an item sits the same distance from the card on every side.
Domains
Code
<section class="moin-card">
<div class="moin-card-head">
<h2 class="moin-heading">Domains</h2>
</div>
<div class="moin-list">
<a href="#" class="moin-item">
<div class="moin-item-text">
<div class="moin-item-name">example.com</div>
</div>
<i class="moin-chevron"></i>
</a>
<a href="#" class="moin-item">
<div class="moin-item-text">
<div class="moin-item-name">www.example.com</div>
</div>
<i class="moin-chevron"></i>
</a>
</div>
</section>To the edge
moin-bleed takes what is in a card out to its edge, past the card’s padding. moin-inset moves something inside it back in by that padding. Use the two for a log or a table that fills the card.
Output
This line runs to the edge of the card, and its words stay in line with the title.
Code
<section class="moin-card">
<div class="moin-card-head">
<h2 class="moin-heading">Output</h2>
</div>
<div class="moin-bleed">
<pre class="moin-log moin-inset">This line runs to the edge of the card, and its words stay in line with the title.</pre>
</div>
</section>