Skip to content
v0.9.1
Components

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.

Basic

.media holds a picture and a .media-body. The picture can be an avatar, an image, or an icon.

AK
Ana Kim 4 minutes ago

Can order #10421 ship by Friday? It is a birthday present and I would love it to arrive on time. Happy to pay for express.

<div class="media" id="mo-basic" style="max-width: 36rem">
  <span class="avatar bg-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? It is a birthday present and I would love it to arrive on time. Happy to pay for express.</p>
  </div>
</div>
<div class="media">
  <span class="avatar bg-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 thread of replies

Put a .media inside a .media-body for a reply. .media-thread draws a line down from the first picture. For a full comment box with a reply field, use Comments.

AK
Ana Kim 2 hr

The mug arrived with a chipped handle. Can I get a replacement?

MR
Marco Rossi Team 1 hr

So sorry, Ana! A new one ships today. No need to send the old one back.

AK
Ana Kim 52 min

That was fast. Thank you!

<div class="media media-thread" id="mo-thread" style="max-width: 36rem">
  <span class="avatar bg-pink">AK</span>
  <div class="media-body">
    <div class="media-title">Ana Kim <span class="media-meta">2 hr</span></div>
    <p>The mug arrived with a chipped handle. Can I get a replacement?</p>
    <div class="cluster"><button class="btn btn-sm" type="button"><i class="mi mi-thumbs-up"></i> 2</button><button class="btn btn-sm" type="button"><i class="mi mi-reply"></i> Reply</button></div>
    <div class="media media-sm">
      <span class="avatar avatar-sm bg-cyan">MR</span>
      <div class="media-body">
        <div class="media-title">Marco Rossi <span class="badge badge-violet-soft">Team</span> <span class="media-meta">1 hr</span></div>
        <p>So sorry, Ana! A new one ships today. No need to send the old one back.</p>
      </div>
    </div>
    <div class="media media-sm">
      <span class="avatar avatar-sm bg-pink">AK</span>
      <div class="media-body">
        <div class="media-title">Ana Kim <span class="media-meta">52 min</span></div>
        <p>That was fast. Thank you!</p>
      </div>
    </div>
  </div>
</div>
<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-figure is a square picture (a photo, or a colored box). .media-actions sits at the end of the row, and .media-list stacks rows with a dashed rule between them: a cart, search results, a file list.

  • Momo Mug
    Ceramic, 350 ml, in stock
    $24.00
  • Canvas Tote
    Cotton canvas, 3 left
    $29.00
  • Dot Notebook
    A5, 120 pages, in stock
    $14.00
<div class="card w-full" style="max-width: 34rem">
  <div class="card-body">
    <ul class="media-list" id="mo-cart">
      <li class="media media-center">
        <span class="media-figure bg-pink"><i class="mi mi-coffee"></i></span>
        <div class="media-body"><div class="media-title">Momo Mug</div><span class="media-meta">Ceramic, 350 ml, in stock</span></div>
        <div class="media-actions"><b>$24.00</b><button class="btn btn-icon btn-sm btn-ghost" type="button" aria-label="Remove Momo Mug"><i class="mi mi-trash-2"></i></button></div>
      </li>
      <li class="media media-center">
        <span class="media-figure bg-cyan"><i class="mi mi-shopping-bag"></i></span>
        <div class="media-body"><div class="media-title">Canvas Tote</div><span class="media-meta">Cotton canvas, 3 left</span></div>
        <div class="media-actions"><b>$29.00</b><button class="btn btn-icon btn-sm btn-ghost" type="button" aria-label="Remove Canvas Tote"><i class="mi mi-trash-2"></i></button></div>
      </li>
      <li class="media media-center">
        <span class="media-figure bg-violet"><i class="mi mi-book-open"></i></span>
        <div class="media-body"><div class="media-title">Dot Notebook</div><span class="media-meta">A5, 120 pages, in stock</span></div>
        <div class="media-actions"><b>$14.00</b><button class="btn btn-icon btn-sm btn-ghost" type="button" aria-label="Remove Dot Notebook"><i class="mi mi-trash-2"></i></button></div>
      </li>
    </ul>
  </div>
</div>
<ul class="media-list">
  <li class="media media-center">
    <img class="media-figure" src="mug.jpg" alt="">
    <div class="media-body">
      <div class="media-title">Momo Mug</div>
      <span class="media-meta">Ceramic, 350 ml, in stock</span>
    </div>
    <div class="media-actions">
      <b>$24.00</b>
      <button class="btn btn-icon btn-sm btn-ghost" aria-label="Remove">…</button>
    </div>
  </li>
  …
</ul>

Icons and sides

.media-icon is a square for a Moey icon; color it with .bg-<color>. .media-center and .media-end line the picture up with the middle or the bottom of the text, and .media-reverse puts it on the other side.

Payment received
$129.00 from Marco Rossi
Low stock
Canvas Tote: 3 left
PN
Priya Nair
Shop owner, Bengaluru
<div class="stack" style="max-width: 26rem; --stack-gap: 1rem" id="mo-icons">
  <div class="media media-center">
    <span class="media-icon bg-green"><i class="mi mi-circle-check"></i></span>
    <div class="media-body"><div class="media-title">Payment received</div><span class="media-meta">$129.00 from Marco Rossi</span></div>
  </div>
  <div class="media media-center">
    <span class="media-icon bg-yellow"><i class="mi mi-triangle-alert"></i></span>
    <div class="media-body"><div class="media-title">Low stock</div><span class="media-meta">Canvas Tote: 3 left</span></div>
  </div>
  <div class="media media-center media-reverse" id="mo-reverse">
    <span class="avatar avatar-lg bg-violet">PN</span>
    <div class="media-body text-end"><div class="media-title">Priya Nair</div><span class="media-meta">Shop owner, Bengaluru</span></div>
  </div>
</div>
<div class="media media-center">
  <span class="media-icon bg-green"><i class="mi mi-circle-check"></i></span>
  <div class="media-body">
    <div class="media-title">Payment received</div>
    <span class="media-meta">$129.00 from Marco Rossi</span>
  </div>
</div>

<div class="media media-center media-reverse">…</div>

A feature list

.media-lg is roomier, with a bigger icon and title. .media-stack puts the picture on top on phones.

Fast shipping

Packed by hand and out the door within one working day.

Free returns

30 days to change your mind, with a prepaid label.

Plastic-free

Recycled paper and plant-based tape in every box.

<div class="grid grid-cols-1 md:grid-cols-3 gap-4" id="mo-features">
  <div class="media media-lg media-stack">
    <span class="media-icon bg-cyan"><i class="mi mi-truck"></i></span>
    <div class="media-body"><div class="media-title">Fast shipping</div><p>Packed by hand and out the door within one working day.</p></div>
  </div>
  <div class="media media-lg media-stack">
    <span class="media-icon bg-pink"><i class="mi mi-rotate-ccw"></i></span>
    <div class="media-body"><div class="media-title">Free returns</div><p>30 days to change your mind, with a prepaid label.</p></div>
  </div>
  <div class="media media-lg media-stack">
    <span class="media-icon bg-lime"><i class="mi mi-leaf"></i></span>
    <div class="media-body"><div class="media-title">Plastic-free</div><p>Recycled paper and plant-based tape in every box.</p></div>
  </div>
</div>

Reference

ClassWhat it does
.media + a picture + .media-bodyThe layout. The picture can be an avatar, an img.media-figure, any .media-figure or a .media-icon
.media-title, .media-meta, .media-actionsThe name or headline, quiet extra text, buttons at the end
.media-figure, .media-iconA square picture (--media-size, 4rem), a square for an icon
.media-center, .media-end, .media-reverseLine the picture up with the middle or bottom, put it on the other side
.media-sm, .media-lg, --media-gapSizes and spacing
.media-list, .media-thread, .media-stackRows with rules between, a line along nested replies, picture on top on phones

Start

OverviewStart Getting startedStart CustomizeStart

Guides

AccessibilityGuides BreakpointsGuides ChangelogGuides Customize componentsGuides JavaScriptGuides MotionGuides OptimizeGuides PhonesGuides RebootGuides Right-to-left (RTL)Guides Stacking orderGuides Using Momo with AIGuides

Foundations

ColorsFoundations TypographyFoundations ProseFoundations Images & figuresFoundations CodeFoundations Lines & shadowsFoundations Dark modeFoundations

Forms

Checkbox & switchForms ComboboxForms Date pickerForms Date rangeForms Fields & labelsForms File uploadForms Floating labelsForms Number stepperForms PasswordForms PIN codeForms RatingForms SelectForms SliderForms Tag inputForms Time pickerForms ValidationForms

Components

AccordionComponents Alert & bannerComponents AvatarComponents BadgeComponents BreadcrumbComponents ButtonComponents Button groupComponents CalendarComponents CardComponents CarouselComponents ChartsComponents ChipsComponents CollapseComponents Command paletteComponents CommentsComponents Confirm dialogsComponents Cookie bannerComponents Data tableComponents Description listComponents Dialog & toastComponents DividerComponents DrawerComponents Dropdown menuComponents Empty stateComponents File managerComponents Filter & sortComponents Gallery & lightboxComponents Inbox & chatComponents Infinite scrollComponents KanbanComponents Keyboard shortcutsComponents List groupComponents MarqueeComponents Media objectComponents Nav overflowComponents Notification centerComponents PaginationComponents ProgressComponents Pull to refreshComponents SkeletonComponents SortableComponents SpinnerComponents Split viewComponents Stat cardComponents Steps & wizardComponents Swipe actionsComponents TableComponents TabsComponents TimelineComponents TogglerComponents Tooltip & popoverComponents TourComponents Tree viewComponents VideoComponents WhiteboardComponents

Layout

Announcement barLayout App shellLayout Back to topLayout Container & sectionLayout ExamplesLayout FooterLayout HeroLayout JumbotronLayout Mega menuLayout NavbarLayout Site sidebarLayout

Sections

Bento gridSections Blog cardsSections Call to actionSections Contact & newsletterSections FAQSections FeaturesSections Logo cloudSections PricingSections TeamSections TestimonialsSections

Utilities

OverviewUtilities State variantsUtilities Display & flexUtilities Grid & gapUtilities SpacingUtilities SizingUtilities TextUtilities Links & color strengthUtilities Position & overflowUtilities BackgroundsUtilities Borders & effectsUtilities Transforms & filtersUtilities InteractionsUtilities

Helpers

Fixed, sticky & frostedHelpers Hover & focusHelpers Hover revealHelpers Icon linkHelpers PrintHelpers Relative timeHelpers Screen reader textHelpers Scroll inHelpers ScrollspyHelpers Share buttonHelpers Skip linkHelpers StacksHelpers Stretched linkHelpers Theme toggleHelpers Truncated textHelpers

Page patterns

404 pagePage patterns Coming soonPage patterns Login & registerPage patterns SettingsPage patterns ProfilePage patterns CRM contactsPage patterns ProjectsPage patterns File manager pagePage patterns Billing & plansPage patterns Help centerPage patterns Mobile app screensPage patterns
↑ ↓ moveEnter openEsc close