mmo-notification
1 symbol · generated 5 Oct 2026
mmo-notification
mmo-notification.jhs:1Notification element to display a notification or a modal following the attached class
- Extends
- CustomShadowElement
Index
| show(elements) | Show a notification | |
| alert(elements) | Show a modal notification | |
| close(value) | Close the notification: it is put away, and whoever opened it hears about it. | |
| title | the heading of the card | |
| header | anything else on the header line, next to the title | |
| (default) | the body | |
| footer | the buttons under it | |
| .modal | make the notification a modal | |
| .onboarding | make the notification an onboarding notification | |
| .info | set info colors for the notification | |
| .warning | set warning colors for the notification | |
| .error | set error colors for the notification | |
| .success | set success colors for the notification |
Methods3
show(elements)
mmo-notification.jhs:45Show a notification
| ...elements | ...HTMLElement | - The elements to show in the notification |
| returns | Promise | A promise that resolves when the notification is closed |
alert(elements)
mmo-notification.jhs:72Show a modal notification
| ...elements | ...HTMLElement | - The elements to show in the notification |
| returns | Promise | A promise that resolves when the notification is closed |
close(value)
mmo-notification.jhs:85Close the notification: it is put away, and whoever opened it hears about it.
| value | any | - The value to return when the notification is closed |
Slots4
title
mmo-notification.jhsthe heading of the card
<slot name="title">
header
mmo-notification.jhsanything else on the header line, next to the title
<slot name="header">
(default)
mmo-notification.jhsthe body
<slot>
footer
mmo-notification.jhsthe buttons under it
<slot name="footer">
CSS hooks6
.modal
mmo-notification.jhsmake the notification a modal
.modal
.onboarding
mmo-notification.jhsmake the notification an onboarding notification
.onboarding
.info
mmo-notification.jhsset info colors for the notification
.info
.warning
mmo-notification.jhsset warning colors for the notification
.warning
.error
mmo-notification.jhsset error colors for the notification
.error
.success
mmo-notification.jhsset success colors for the notification
.success