Header menu logo fable-electron-docs-api

Options Type

Constructors

Constructor Description

Options(?title, ?subtitle, ?body, ?silent, ?icon, ?hasReply, ?timeoutType, ?replyPlaceholder, ?sound, ?urgency, ?actions, ?closeButtonText, ?toastXml)

Full Usage: Options(?title, ?subtitle, ?body, ?silent, ?icon, ?hasReply, ?timeoutType, ?replyPlaceholder, ?sound, ?urgency, ?actions, ?closeButtonText, ?toastXml)

Parameters:
    ?title : 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
?title : 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

this.actions

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.

this.body

Full Usage: this.body

The body text of the notification, which will be displayed below the title or subtitle.

this.closeButtonText

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.

this.hasReply

Full Usage: this.hasReply

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ Whether or not to add an inline reply option to the notification.

this.icon

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.

this.replyPlaceholder

Full Usage: this.replyPlaceholder

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ The placeholder to write in the inline reply input field.

this.silent

Full Usage: this.silent

Whether or not to suppress the OS notification noise when showing the notification.

this.sound

Full Usage: this.sound

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ The name of the sound file to play when the notification is shown.

this.subtitle

Full Usage: this.subtitle

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ A subtitle for the notification, which will be displayed below the title.

this.timeoutType

Full Usage: this.timeoutType

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ✔ | MAS ❌ The timeout duration of the notification. Can be 'default' or 'never'.

this.title

Full Usage: this.title

A title for the notification, which will be displayed at the top of the notification window when it is shown.

this.toastXml

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.

this.urgency

Full Usage: this.urgency

⚠ OS Compatibility: WIN ❌ | MAC ❌ | LIN ✔ | MAS ❌ The urgency level of the notification. Can be 'normal', 'critical', or 'low'.

Type something to start searching.