UILab

Alert

Displays a callout for user attention.

Usage

import {
  Alert,
  AlertDescription,
  AlertTitle
} from "uilab-core"
<Alert>
  <AlertTitle>Heads up!</AlertTitle>
  <AlertDescription>
    You can add components and dependencies to your app using the cli.
  </AlertDescription>
</Alert>

Examples

Basic

A basic alert with an icon, title and description.

Destructive

Use variant="destructive" to create a destructive alert.

Action

Use AlertAction to add a button or other action element to the alert.

Custom color

You can customize the alert colors by adding custom classes such as bg-amber-50 dark:bg-amber-950 to the Alert component.

On this page