Alert

A callout for important, non-blocking information — tinted semantic variants with an icon slot.

Feedback

Playground

Tweak the props, the preview and the code follow.

Props
<Alert>
  <Terminal />
  <AlertTitle>Heads up</AlertTitle>
  <AlertDescription>Your API key expires in 3 days.</AlertDescription>
</Alert>

Installation

npx @plumsydev/plum-ui add alert

Usage

import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
<Alert variant="success">
  <CheckCircle2 />
  <AlertTitle>Domain verified</AlertTitle>
  <AlertDescription>acme.com is now live.</AlertDescription>
</Alert>

Examples

Variants

Dismissible

Add an AlertAction and animate it out with AnimatePresence.

API Reference

Alert

PropTypeDefault
variant

Semantic color.

"default" | "destructive" | "success" | "warning" | "info""default"

AlertAction

Absolutely positioned top-right slot for a close button or link.

Notes

  • The first direct svg child becomes the icon column automatically — no wrapper needed.