Alerts & Toasts
Three feedback systems coexist: inline alerts and callouts (CSS), page-wide banners, and programmatic toasts dispatched via a global event.
Inline Alerts
Info — something you should know.
Success — your changes were saved.
Warning — double-check this.
Error — something went wrong.
HTML
<div class="ziom-alert ziom-alert-info">Info — something you should know.</div>
<div class="ziom-alert ziom-alert-success">Success — your changes were saved.</div>
<div class="ziom-alert ziom-alert-warning">Warning — double-check this.</div>
<div class="ziom-alert ziom-alert-danger">Error — something went wrong.</div>
Callouts
Emphasized notes with a colored left border.
Note
This is important information to be aware of.
HTML
<div class="ziom-callout ziom-callout-info">
<div class="ziom-callout-content">
<div class="ziom-callout-title">Note</div>
<div class="ziom-callout-description">This is important information to be aware of.</div>
</div>
</div>
Toasts
Toasts are fired programmatically by dispatching a ziom:toast
CustomEvent on window. The global toast surface
(shared/ziom_toast) listens and renders it. Try the live buttons:
JavaScript
window.dispatchEvent(new CustomEvent("ziom:toast", {
detail: { message: "Saved!", level: "success" } // success | danger | warning | info
}))