---
title: Alert
description: Displays a callout for user attention.

link:
  doc: https://kobalte.dev/docs/core/components/alert
  api: https://kobalte.dev/docs/core/components/alert#api-reference
---

<ComponentPreview name="alert-demo">

```tsx file=<rootDir>/apps/docs/src/registry/examples/alert-demo.tsx

```

</ComponentPreview>

## Installation

<ComponentInstallation>

<Step>

<StepItem>Copy and paste the following code into your project:</StepItem>

  <ComponentSourceTabs>

    ```tsx title="components/ui/alert" file=<rootDir>/apps/docs/src/registry/ui/alert.tsx

    ```

    ```tsx title="components/ui/alert" file=<rootDir>/apps/unocss-playground/src/registry/ui/alert.tsx

    ```

  </ComponentSourceTabs>

</Step>

</ComponentInstallation>

## Usage

```tsx
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
```

```tsx
<Alert>
  <AlertTitle />
  <AlertDescription />
</Alert>
```

## Examples

### Destructive

<ComponentPreview name="alert-destructive-demo">

```tsx file=<rootDir>/apps/docs/src/registry/examples/alert-destructive-demo.tsx

```

</ComponentPreview>
