Did you know?dyk.si

Toast (Snackbar)

A brief message that confirms an action, then disappears on its own without blocking the screen.

Also known as: Snackbar

role="status" aria-live="polite"

When to use it

To confirm a finished action (saved, sent, deleted), ideally with an Undo.

Common mistake

Don’t use it for errors the user must fix; it disappears before they can act.

Accessibility

Announce it with a polite live region and keep it visible for at least 4 seconds.

Name in code

HTML/CSSrole="status" aria-live="polite"
Reacttoast() — sonner
Jetpack ComposeSnackbarHost + Snackbar
SwiftUI.overlay + .transition (custom)

Ready prompt for your coding agent

Add a Toast (Snackbar) to this screen. What it is: A brief message that confirms an action, then disappears on its own without blocking the screen. Implement with: role="status" aria-live="polite" (HTML/CSS). Accessibility: Announce it with a polite live region and keep it visible for at least 4 seconds. When to use it: To confirm a finished action (saved, sent, deleted), ideally with an Undo. Avoid: Don’t use it for errors the user must fix; it disappears before they can act. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.