Media object
A picture beside some text — comments, feeds, list rows, profiles. The text never wraps under the picture, and long words never push it out.
Can order #10421 ship by Friday? It's a birthday present and I'd love it to arrive on time — happy to pay for express.
<div class="media">
<span class="avatar avatar-pink">AK</span>
<div class="media-body">
<div class="media-title">
Ana Kim
<span class="media-meta">· 4 minutes ago</span>
</div>
<p>Can order #10421 ship by Friday?</p>
</div>
</div>
A comment thread
Nest a .media in a .media-body for replies; .media-thread adds a line along them.
The mug arrived with a chipped handle. Can I get a replacement?
So sorry, Ana! A new one ships today — no need to send the old one back.
That was fast. Thank you! 🎉
<div class="media media-thread">
<span class="avatar">AK</span>
<div class="media-body">
<div class="media-title">Ana Kim</div>
<p>The mug arrived with a chipped handle…</p>
<div class="media media-sm"> <!-- a reply -->
<span class="avatar avatar-sm">MR</span>
<div class="media-body">…</div>
</div>
</div>
</div>
Rows with actions
.media-actions sits at the end. .media-list stacks them with lines between.
- Moey MugCeramic · 350 ml · In stock$14.00
- Moey ToteCotton canvas · 3 left$22.00
- Moey Sticker pack12 stickers · In stock$6.00
<ul class="media-list">
<li class="media media-center">
<img class="media-figure" src="mug.jpg" alt="" width="72" height="72">
<div class="media-body">
<div class="media-title">Moey Mug</div>
Ceramic · 350 ml
</div>
<div class="media-actions">
<strong>$14.00</strong>
<button class="btn btn-gray btn-ghost btn-icon btn-sm" aria-label="Remove">…</button>
</div>
</li>
…
</ul>
Icons and alignment
.media-icon is a tinted square for an icon (color it with theme-*). .media-center / .media-end align the picture; .media-reverse puts it on the other side.
<div class="media media-center">
<span class="media-icon theme-green"><i class="mi mi-circle-check"></i></span>
<div class="media-body">
<div class="media-title">Payment received</div>
$129.00 from Max Ruiz
</div>
</div>
<div class="media media-center">
<span class="media-icon theme-amber">
<i class="mi mi-triangle-alert"></i>
</span>
<div class="media-body">
<div class="media-title">Low stock</div>
Moey Tote — 3 left
</div>
</div>
<div class="media media-reverse media-center">
<span class="avatar avatar-lg avatar-purple">JD</span>
<div class="media-body text-end">
<div class="media-title">Jane Doe</div>
Store owner · Lisbon
</div>
</div>
A feature list
With bigger pictures and .media-lg; .media-stack puts the picture on top on phones.
Packed by hand and out the door within one business day.
30 days to change your mind, with a prepaid label.
Recycled paper and plant-based tape in every box.
<div class="media media-lg media-stack">
<span class="media-icon theme-blue"><i class="mi mi-truck"></i></span>
<div class="media-body">
<div class="media-title">Fast shipping</div>
<p>…</p>
</div>
</div>
| Class | What it does |
|---|---|
.media + a picture + .media-body | The layout. The picture can be an avatar, img.media-figure, any .media-figure or a .media-icon |
.media-title · .media-meta · .media-actions | Name / headline · quiet extra text · buttons at the end |
.media-center · .media-end · .media-reverse | Align the picture · put it on the other side |
.media-sm · .media-lg · --mo-media-gap | Spacing |
.media-list · .media-thread · .media-stack | Rows with lines · a line along nested replies · picture on top on phones |