Components
Twelve primitives, no more. Each one is a class you apply to semantic HTML — the library never generates markup for you, so your accessibility tree stays under your control.
Button
<button class="mrd-btn mrd-btn--primary">Save changes</button>
<button class="mrd-btn mrd-btn--secondary">Cancel</button>
<button class="mrd-btn mrd-btn--ghost">Learn more</button>
<button class="mrd-btn mrd-btn--danger">Delete</button>
One primary button per view. If a screen appears to need two, the second action is usually secondary — the exception is a two-step confirmation dialog, where the pair is deliberate.
| State | Class | Behaviour |
|---|---|---|
| Hover | — | Accent darkens one step; no movement |
| Focus | — | 2px accent ring, offset 2px, keyboard only |
| Loading | is-loading | Spinner replaces label; width is preserved |
| Disabled | is-disabled | 40% opacity, pointer events off |
Input
<label class="mrd-field">
<span class="mrd-field__label">Project name</span>
<input class="mrd-input" type="text" value="billing-export">
<span class="mrd-field__hint">Lowercase, hyphens allowed.</span>
</label>
Labels sit above the field, never inside it as a placeholder. Placeholders disappear the moment someone types, which is exactly when they are most needed.
Badge
Badges carry one word. If a status needs a sentence, it belongs in the row's secondary line, not in a pill that pushes the table columns around.
Card
<article class="mrd-card">
<h3 class="mrd-card__title">Weekly export</h3>
<p class="mrd-card__meta">Runs Mondays at 04:00 · 12 columns</p>
</article>
Table shell
Meridian styles the table but not its contents. Row height follows the density setting, header cells are sticky by default, and numeric columns opt into tabular figures:
<table class="mrd-table">
<thead>
<tr><th>Name</th><th class="mrd-table__num">Rows</th><th>Status</th></tr>
</thead>
<tbody>
<tr>
<td>orders_2024</td>
<td class="mrd-table__num">1,204,881</td>
<td><span class="mrd-badge">Active</span></td>
</tr>
</tbody>
</table>
Composition rules
- Do not nest cards. A card inside a card means the page structure is unclear; use a section instead.
- Do not stack badges. More than two statuses in one cell means the data model is doing too much.
- Keep controls at one density. Mixing
compactinputs withcomfortablebuttons produces rows that cannot align.