Practice Widgets Toasts & notifications
Auto-dismiss
Widget practice · Notifications

Toasts & auto-dismiss notifications

Trigger toasts in four flavours (success / error / warn / info) with a configurable duration, then practise asserting visibility before they vanish — and asserting they're gone after they do. The live region is at role="status" with aria-live="polite".

Trigger a toast

Toasts auto-dismiss after the configured duration unless you click the close button.

id=show-btn · show-3-btn · dismiss-all · toast-region data-testid=show-toast · show-three · dismiss-all · toast-flavour · toast-duration region=role=status · aria-live=polite · data-testid=toast-region each toast=role=alert · data-testid=toast-{n} · data-flavour=success/error/warn/info
No toasts shown yet.