Skip to content

Toast

Toast is a non-blocking notification overlay used to show brief feedback without interrupting the workflow.

Use Toast for messages like "Saved", "Copied", or "Connected". Toasts should disappear automatically and should not require user action.


Quick start

import bootstack as bs

app = bs.App()

bs.Toast(
    app,
    title="Saved",
    message="Your changes were saved successfully.",
).show()

app.mainloop()

When to use

Use Toast when:

  • feedback is helpful but not critical

  • the user should not be interrupted

Consider a different control when...

  • the user must confirm or decide something — use MessageBox

  • the feedback is tied to a specific control (validation, helper text) — use inline messaging


Appearance

Variants

Toast supports different visual intents through the accent parameter:

  • info — general information
  • success — positive confirmation
  • warning — caution notices
  • danger — error or critical messages

Examples & patterns

Common options

  • title — the toast heading

  • message — the body text

  • duration — auto-hide delay in milliseconds

  • accent / intent — info, success, warning, danger


Behavior

  • Non-modal (does not block)

  • Auto-dismiss after a short duration (typically configurable)

  • Usually stacks if multiple toasts are shown

  • Click-to-dismiss is common (if supported)


Additional resources

Framework concepts

  • Widgets — overview of all widgets

API reference