> ## 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.

# Alert

> An Alert communicates information about a specific user action on a page. It lives inside the page and appears contextually within a task flow and disappears when the user closes it, resolves the issue, or (if required by feature) navigates away from the page.

## Alert

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

Alerts are considered medium-emphasis communication and should be used sparingly. Medium-priority feedback is informative and occasionally actionable. These messages are more noticeable but not urgent. They should draw attention without causing disruption.

### When to use

* For contextual guidance or inline recommendations: When users need clarification or additional context about their current task or when suggesting next steps within the workflow.
  *Example:* Displaying an Alert within a symbols or mapping list to help explain how a user can link or unlink assets.
* To communicate warnings or issues: When an action requires attention, but isn’t blocking progress or the user can resolve the issue in a separate context.
  *Example:* To alert the user that transformations have failed and user action is required to troubleshoot the problem.
* When actions need to be taken: If the user should resolve an issue directly within the Alert.
  *Example:* Re-establishing a failed connection.

### Dos and don'ts

* Do use action [Button](/aura-design-system/primitives/button)s when the action is specific to the message and will resolve (dismiss) it.
* Do consider other methods for feedback before using an Alert, such as inline validation on forms. Avoid mixing multiple feedback states as this becomes confusing or frustrating to a user.
* Don't use action [Button](/aura-design-system/primitives/button)s for unrelated activities or activities that don't resolve the Alert.

### Placement

* Always align the edge of the Alert relative to the surrounding content. Alerts should never be flush to a container’s divider.
* Use the card style Alert when content needs to wrap and applies to a small container.
* Use the strip style Alert when content is short and applies to a larger container.

### Behavior

* Inline to the page: it does not block the full viewport like a [Dialog](/aura-design-system/primitives/dialog) or [Alert dialog](/aura-design-system/primitives/alert-dialog).
* Dismissal removes the alert from the layout (or hides it) per variant; optional actions should complete or dismiss the alert in one clear step.
* If the alert includes focusable controls, manage focus appropriately; otherwise it typically does not trap focus.
* Product rules decide whether dismissed state persists across navigation or sessions.

### Often used with

* [Button](/aura-design-system/primitives/button) for dismiss or fix-it actions; optional inline icon; sits above related content, not inside unrelated [Card](/aura-design-system/primitives/card) chrome unless scoped to that region.
