Skip to main content

Describes a web notification. For more details, see the web Notification interface.

Properties (13)

Property Type Default Required Description
badge⚓︎ string x x

URL of an image to represent the notification as a badge.

body⚓︎ string x x

Notification body text.

data⚓︎ any x x

Arbitrary data you have associated with the notification.

dir⚓︎ "auto" | "ltr" | "rtl" "auto" x

The direction in which to display the notification.

icon⚓︎ string x x

URL of an icon to be displayed in the notification.

image⚓︎ string x x

URL of an image to be displayed in the notification.

lang⚓︎ string x x

Language code of the notification.

renotify⚓︎ boolean false x

If true, will renotify the user if a new notification replaces an old one. In this case, tag must also be set.

requireInteraction⚓︎ boolean false x

If true, the notification will remain active and won't be closed until the user clicks on it or dismisses it.

silent⚓︎ boolean false x

If true, the notification will be silent (no sound or vibration) despite the device settings. In this case, vibrate must not be set.

tag⚓︎ string x x

ID tag of the notification.

timestamp⚓︎ number x x

Specifies the time at which the notification is created or is applicable (past, present or future).

vibrate⚓︎ number[] x x

Vibration pattern for the vibration hardware of the device to emit with the notification. If specified, silent must not be true.