Options Type
Constructors
| Constructor |
Description
|
Full Usage:
Options(?title, ?subtitle, ?body, ?silent, ?icon, ?hasReply, ?timeoutType, ?replyPlaceholder, ?sound, ?urgency, ?actions, ?closeButtonText, ?toastXml)
Parameters:
string
-
A title for the notification, which will be displayed at the top of the notification window when it is
shown.
?subtitle : string
-
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || A subtitle for the
notification, which will be displayed below the title.
?body : string
-
The body text of the notification, which will be displayed below the title or subtitle.
?silent : bool
-
Whether or not to suppress the OS notification noise when showing the notification.
?icon : U2<string, NativeImage>
-
An icon to use in the notification. If a string is passed, it must be a valid path to
a local icon file.
?hasReply : bool
-
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || Whether or not to
add an inline reply option to the notification.
?timeoutType : TimeoutType
-
⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ✔ | MAS ❌ || The timeout duration of
the notification. Can be 'default' or 'never'.
?replyPlaceholder : string
-
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || The placeholder to write
in the inline reply input field.
?sound : string
-
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || The name of the
sound file to play when the notification is shown.
?urgency : Urgency
-
⚠ OS Compatibility: WIN ❌ | MAC ❌ | LIN ✔ | MAS ❌ || The urgency level of
the notification. Can be 'normal', 'critical', or 'low'.
?actions : NotificationAction[]
-
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || Actions to add to
the notification. Please read the available actions and limitations in the NotificationAction documentation.
?closeButtonText : string
-
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || A custom title for
the close button of an alert. An empty string will cause the default localized text to be used.
?toastXml : string
-
⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || A custom description of
the Notification on Windows superseding all properties above. Provides full customization of design and behavior of the notification.
Returns: Options
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.actions
|
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ Actions to add to the notification. Please read the available actions and limitations in the NotificationAction documentation. |
Full Usage:
this.body
|
The body text of the notification, which will be displayed below the title or subtitle. |
Full Usage:
this.closeButtonText
|
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ A custom title for the close button of an alert. An empty string will cause the default localized text to be used. |
Full Usage:
this.hasReply
|
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ Whether or not to add an inline reply option to the notification. |
Full Usage:
this.icon
|
An icon to use in the notification. If a string is passed, it must be a valid path to a local icon file. |
Full Usage:
this.replyPlaceholder
|
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ The placeholder to write in the inline reply input field. |
Full Usage:
this.silent
|
Whether or not to suppress the OS notification noise when showing the notification. |
Full Usage:
this.sound
|
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ The name of the sound file to play when the notification is shown. |
Full Usage:
this.subtitle
|
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ A subtitle for the notification, which will be displayed below the title. |
Full Usage:
this.timeoutType
|
⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ✔ | MAS ❌ The timeout duration of the notification. Can be 'default' or 'never'. |
Full Usage:
this.title
|
A title for the notification, which will be displayed at the top of the notification window when it is shown. |
Full Usage:
this.toastXml
|
⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ A custom description of the Notification on Windows superseding all properties above. Provides full customization of design and behavior of the notification. |
Full Usage:
this.urgency
|
⚠ OS Compatibility: WIN ❌ | MAC ❌ | LIN ✔ | MAS ❌ The urgency level of the notification. Can be 'normal', 'critical', or 'low'. |
fable-electron-docs-api