Moey Icons
No results. Try “dialog”, “dark” or “grid”.
Components

Alert

Inline messages. Flat; give them a color with alert-amber, alert-red… and a strength like alert-subtle if you like.

A new version is available. See what's new
Your changes were saved.
Your storage is 90% full.
Tip: press / to search from anywhere.
<div class="alert alert-green alert-subtle" role="status">
  <i class="mi mi-circle-check alert-icon"></i>
  <div class="alert-content">Your changes were saved.</div>
</div>

Title, actions and dismiss

Your trial ends in 3 days

Add a payment method to keep your workspace and all your data.

<div class="alert alert-amber alert-subtle" role="status">
  <i class="mi mi-triangle-alert alert-icon"></i>
  <div class="alert-content">
    <div class="alert-title">Your trial ends in 3 days</div>
    <p>Add a payment method to keep your workspace.</p>
    <div class="alert-actions">…buttons…</div>
  </div>
  <button class="btn-close" aria-label="Dismiss"></button>
</div>

The close button takes the alert's color automatically, and with moey.js included it just works — click it and the alert fades out. No extra attributes.

<script src="dist/moey.js" defer></script>

<!-- Any other button can close it too -->
<button class="btn btn-ghost btn-sm" data-moey-dismiss>Remind me later</button>
<button data-moey-dismiss="#promo">Hide the promo</button>

// React to it
alert.addEventListener('moey:close', e => { if (unsaved) e.preventDefault(); });  // cancel
document.addEventListener('moey:closed', e => console.log('removed', e.detail.element));

// Or from code
Moey.dismiss(document.querySelector('#my-alert'));

.alert-instant skips the fade.

Plain text and dividers

Text can go straight inside an alert — the close button pins itself to the top-right. A <hr> inside takes the alert's color.

Heads up! Plain text with a link and a close button.
Well done!

You successfully read this important message.


Use a divider to separate extra details.

<div class="alert alert-amber alert-subtle" role="status">
  <strong>Heads up!</strong> Plain text with a <a href="#">link</a>.
  <button class="btn-close" aria-label="Close"></button>
</div>

Solid, outline, small and banner

Scheduled maintenance
Saturday 02:00–04:00 UTC. Expect a short downtime.
Compact — for inline form messages.
New: dark mode is here. Try it
ClassUse it for
.alert-<color> + .alert-subtleMost messages — a light tint
.alert-<color> alone · .alert-softA bit more color (the soft default fill · a light fill)
.alert-solid · .alert-vivid · .alert-deepCritical, must-see messages — the full color, stronger, darkest
.alert-outlineQuieter messages inside busy pages
.alert-smCompact inline messages (forms, cards)
.alert-bannerFull-width bar at the top of a page or app

Accessibility: use role="alert" for urgent messages that appear while someone works (errors) — screen readers announce them immediately. Use role="status" for everything else.

Strengths

Every alert color comes in the same strengths as buttons — from a whisper to a shout.

Subtle — alert-green alert-subtle
Soft — alert-green alert-soft
Default — alert-green
Solid — alert-green alert-solid
Vivid — alert-green alert-vivid
Deep — alert-green alert-deep
<div class="alert alert-green alert-subtle">…</div>   <!-- lightest -->
<div class="alert alert-green">…</div>                <!-- the soft default fill -->
<div class="alert alert-green alert-vivid">…</div>
<div class="alert alert-green alert-deep">…</div>     <!-- darkest -->

Colors

New reports are ready.
Your trial ends in 3 days.
The card was declined.
Try the new editor.
Order #10421 is on its way.
<div class="alert alert-amber alert-subtle">…</div>

Form error summary

Above a form after a failed submit — role="alert" so it is announced right away.

<div class="alert alert-red alert-subtle max-w-lg" role="alert">
  <i class="mi mi-circle-x alert-icon"></i>
  <div class="alert-content"><div class="alert-title">2 fields need attention</div>
    <ul class="mt-1 mb-0 mx-0 ps-4">
      <li><a href="#alert">Email</a> is not a valid address</li>
      <li><a href="#alert">Password</a> must be at least 8 characters</li>
    </ul>
  </div>
</div>

Inside a card

Payouts
Add a bank account to receive payouts. Add account

Your next payout is scheduled for Monday.

<div class="card"><div class="card-header"><div class="card-title">Payouts</div></div><div class="card-body grid grid-cols-1 gap-4">
  <div class="alert alert-amber alert-subtle alert-sm" role="status">
    <i class="mi mi-triangle-alert alert-icon"></i>
    <div class="alert-content">
      Add a bank account to receive payouts.
      <a href="#alert">Add account</a>
    </div>
  </div>
  <p class="m-0 text-subtle">Your next payout is scheduled for Monday.</p>
</div></div>

Every theme

Default — neutral information.
Accent — something new.
Success — it worked.
Info — good to know.
Warning — check this soon.
<div class="alert alert-green alert-subtle" role="status">
  <i class="mi mi-circle-check alert-icon"></i>
  <div class="alert-content">Success — it worked.</div>
</div>