I
WebNotificationOptions
testeddemoPer-notification options mirroring the `Notification` constructor's `NotificationOptions`, plus the `title` argument folded in for convenience.
Demo
Loading demo…
Signature
ts
interface WebNotificationOptionsProperties
| Property | Type | Description |
|---|---|---|
title? | string | undefined | The title shown at the top of the notification. |
body? | string | undefined | The body text displayed below the title. |
dir? | "auto" | "ltr" | "rtl" | undefined | Text direction. |
lang? | string | undefined | BCP 47 language tag for the notification's content. |
tag? | string | undefined | An identifying tag. Notifications sharing a tag replace one another. |
icon? | string | undefined | URL of an icon to display. |
renotify? | boolean | undefined | Whether to re-alert the user when a notification replaces an older one with the same `tag`. |
requireInteraction? | boolean | undefined | Keep the notification active until the user interacts with it instead of auto-dismissing. |
silent? | boolean | undefined | Whether the notification is silent (no sound/vibration). |
vibrate? | number[] | undefined | Vibration pattern (in milliseconds) for devices that support it. |