notify() function
Send a notification to the user interface.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
State
|
The current user state as received in any callback. |
required |
|
str
|
The notification type. This can be one of "success", "info",
"warning", or "error". |
'I'
|
|
str
|
The text message to display. |
''
|
|
Optional[bool]
|
If True, the system will also show the notification. |
None
|
|
Optional[int]
|
The time, in milliseconds, during which the notification is shown. If not specified or set to None, this parameter will use the value of configuration[notification_duration]. |
None
|
Note that you can also call this function with notification_type set to the first letter or the alert type (i.e. setting notification_type to "i" is equivalent to setting it to "info").
If system_notification is set to True, then the browser requests the system
to display a notification as well. They usually appear in small windows that
fly out of the system tray.
The first time your browser is requested to show such a system notification for
Taipy applications, you may be prompted to authorize the browser to do so. Please
refer to your browser documentation for details on how to allow or prevent this
feature.