> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sonner

> Sonner is a toast notification that appears at the bottom of the screen and auto-dismisses after a few seconds.

## Sonner

<Badge color="blue">v1.0.0</Badge> | [View in Storybook](https://master--695bb4b1b8041ae09768950a.chromatic.com/?path=/docs/primitives-sonner-toast--docs)

### When to use

* To provide timely feedback for user-triggered actions (e.g., "Item deleted.").
* For non-critical updates that don't require immediate attention (e.g., "2 new messages.").
* To confirm or acknowledge system or app processes (e.g., "Downloading file…").
* When you need a lightweight, non-disruptive notification that doesn’t block user progress.
* To display multiple messages in sequence without breaking the user flow.

### When to use something else

* Urgent, blocking issues: use [Dialog](/aura-design-system/primitives/dialog), [Alert dialog](/aura-design-system/primitives/alert-dialog), or [Banner](/aura-design-system/primitives/banner-alert).
* Long or detailed content, or must-stay-visible feedback: use inline validation, [Alert](/aura-design-system/primitives/alert), or dedicated error regions—not a toast.
* Persistent system-level messaging: prefer [Banner](/aura-design-system/primitives/banner-alert); task-scoped feedback: prefer [Alert](/aura-design-system/primitives/alert).

### Dos and don'ts

* Do keep messages short and clear (1-2 lines max).
* Do use appropriate semantic status color and iconography to convey status (e.g., success = green, warning = yellow).
* Do provide an "Undo" or "Retry" action if possible.
* Don't show vague or generic messages (e.g., "Done" or "Failed").
* Don't display more than one Sonner at a time.

### Behavior

There is a priority-based queue and duration of display time depending on the feedback type. The counter ensures that more critical Sonners stay on the screen for a longer period of time, giving the user more chance to read and act on them. Sonners have a minimum display time of 4 seconds.

| Priority | Type     | Display time | Implication                                            |
| :------- | :------- | :----------- | :----------------------------------------------------- |
| 1        | Critical | 8 seconds    | The most important and urgent feedback.                |
| 2        | Warning  | 6 seconds    | A warning that requires attention but is not critical. |
| 3        | Success  | 4 seconds    | A successful action or result.                         |
| 4        | Neutral  | 4 seconds    | A neutral message or information.                      |

Dismissal:
Auto-dismiss: Sonners automatically disappear after their display time (see table above).
Manual dismiss (optional): You can include a close Button for user control, especially for longer or persistent messages.

### Often used with

* Optional action control (e.g. Undo) styled as a [Button](/aura-design-system/primitives/button); status icon; does not include full [Alert](/aura-design-system/primitives/alert) copy blocks.
