Notification toasts component
<wy-notification-toasts>
| WyNotificationToasts
Notification toasts can be displayed when notifications are received. To enable them, just add the <wy-notification-toasts>
element anywhere on your page.
Importing
If you installed the UIKit with npm
you can use the following snippet to import the component into your project.
Otherwise, if you installed the UIKit as a <script>
you can ignore this section.
import { WyNotificationToasts } from "@weavy/uikit-web";
Examples
<wy-notification-toasts></wy-notification-toasts>
Properties
Property | Type/Value | Description |
---|---|---|
appearance |
"internal", "native" |
The kind of toasts to use. Defaults to "internal" . |
duration |
number |
Duration of the HTML toasts in milliseconds. Defaults to 5000. |
requestUserPermission |
boolean |
Whether to use the Notifications API to request user permission to display "internal"" toasts. Defaults to false . This property has no effect on "native" browser notifications, which always require user permission. |
typeFilter |
"activity", "mention", "reaction" |
Optionally filters the notifications to only show notifications of the specified type. |
Learn more about attributes and properties.
Events
Name | Description |
---|---|
wy:link |
Emitted when a notification is clicked. |
Learn more about events.