R
I

WebNotificationOptions

testeddemo

Per-notification options mirroring the `Notification` constructor's `NotificationOptions`, plus the `title` argument folded in for convenience.

Demo

Loading demo…

Signature

ts
interface WebNotificationOptions

Properties

PropertyTypeDescription
title?string | undefinedThe title shown at the top of the notification.
body?string | undefinedThe body text displayed below the title.
dir?"auto" | "ltr" | "rtl" | undefinedText direction.
lang?string | undefinedBCP 47 language tag for the notification's content.
tag?string | undefinedAn identifying tag. Notifications sharing a tag replace one another.
icon?string | undefinedURL of an icon to display.
renotify?boolean | undefinedWhether to re-alert the user when a notification replaces an older one with the same `tag`.
requireInteraction?boolean | undefinedKeep the notification active until the user interacts with it instead of auto-dismissing.
silent?boolean | undefinedWhether the notification is silent (no sound/vibration).
vibrate?number[] | undefinedVibration pattern (in milliseconds) for devices that support it.