Layout UI

Alert

Inline callout with default, destructive, success and warning variants.

Preview

Installation

bash
npx shadcn@latest add @layout/alert

Usage

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

Examples

Success

Warning

Destructive

Guidelines for AI agents

Static inline messaging scoped to a page section. Lead with a lucide icon sized size-4. For transient feedback use a toast instead.

Never

  • Neverstack more than two alerts in a row; consolidate the message
  • Neveruse destructive alerts for warnings; warning exists for that

Tokens consumed

--layout-surface--layout-border--layout-danger--layout-success--layout-warning--layout-radius