bootstack.toast#
- bootstack.toast(message, *, title=None, corner=None, duration=4000, accent=None, icon=None, on_dismiss=None)#
Show a passive toast that dismisses itself, and return immediately.
A toast is the lightest notification — “the app telling you something” with no demand for a response. It floats in a corner of the monitor the app window is on, stacks below any toasts already there, and fades after
duration. For a message the user must dismiss, useNotification; for one tied to the window with an action, useSnackbar.- Parameters:
message (str) – Body text of the toast.
title (str | None) – Optional header shown above the message.
corner (Literal['top-left', 'top-right', 'bottom-left', 'bottom-right'] | None) – Screen corner to anchor to —
'top-left','top-right','bottom-left', or'bottom-right'. Defaults to the bottom-right (top-right on Linux).duration (int) – Time on screen in milliseconds before it auto-dismisses. Defaults to
4000.accent (AccentToken | str | None) – Semantic color accent (e.g.
'success','danger'). Defaults to a neutral surface.icon (str | IconSpec | None) – Optional Bootstrap Icons name (e.g.
'check-circle') or an icon spec dict withname,size, andcolor, shown before the message. No icon is shown unless given.on_dismiss (Callable[[], Any] | None) – Called with no arguments when the toast dismisses.