ui.show_toast

ui.show_toast(toast, *, session=None)

Display a toast notification.

Toast notifications are temporary, non-intrusive messages that appear on screen. They can be used to provide feedback about actions, display brief messages, or show status updates without interrupting the user's workflow.

Parameters

toast : str | Toast | Tag | TagList

A toast object from toast, or a plain string (auto-converted to toast).

session : Optional[Session] = None

Shiny session object. If not provided, the session is inferred via get_current_session.

Returns

: str

The toast ID (for use with hide_toast), or an empty string if the toast has no content (and no action is taken).

Examples

See toast for a complete example, including showing and hiding toast notifications.

See Also