# Notification messaging (/patterns/notification-messaging)



Put a message where the person is most likely to understand and act on it. Use its urgency and required response to choose how much attention it needs. Keep repeated background events from interrupting the current task.

<PatternIllustration pattern="notification-messaging" />

## Choose placement and persistence [#choose-placement-and-persistence]

| Message                                  | Starting treatment                                                     |
| ---------------------------------------- | ---------------------------------------------------------------------- |
| A local action succeeded                 | Confirm beside the action or in a brief status message.                |
| A whole page needs attention             | Keep a [Banner](/components/banner) visible near the affected content. |
| Several unseen events are available      | Use a [Badge](/components/badge) with a named route to the messages.   |
| A decision is required before proceeding | Use a [Dialog](/components/dialog) with explicit choices.              |

A badge count needs context, such as “3 unread notifications.” Keep the messages reachable after the badge is cleared. A failure that prevents saving needs persistent feedback even if the person dismisses a temporary announcement.

## Write the message [#write-the-message]

Name the event or problem, then give the useful next action. For example:

> **Import paused**
>
> The source disconnected. Reconnect it to continue importing.

Use an action label such as “Reconnect source” rather than “OK” when the message offers recovery. Include a close control only when dismissal has a clear meaning. Distinguish dismissing the message from resolving the underlying problem.

## Limit interruption [#limit-interruption]

Announce routine updates politely through an appropriate live region. Reserve urgent announcements for conditions that need immediate attention. Keep focus where it is for background notifications; move it into a dialog only when the interaction requires a dialog.

Group repeated events about the same operation and update an existing message rather than stacking duplicates. Keep messages with important actions available long enough to read and use. Essential recovery should also be available in the affected page.

Check several notifications arriving together, long text, keyboard dismissal, and a message that becomes outdated. See [Saving](/patterns/saving) for status wording and [Error handling](/patterns/error-handling) for failure recovery.
