bearnie

Alert

Contextual messages for user feedback.

Installation

npx bearnie add alert
npx bearnie add alert

Usage

import {
Alert,
AlertTitle,
AlertDescription,
} from "@/components/ui/alert"
<Alert>
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
  You can add components to your app using the CLI.
</AlertDescription>
</Alert>

Examples

Destructive

Success

Warning

Info

Anatomy

  • Alert - The root container with variant styling
  • AlertTitle - The heading text
  • AlertDescription - The descriptive content

Props

Alert

PropTypeDefaultDescription
variantdefault | destructive | success | warning | infodefaultVisual style variant
classstring-Additional CSS classes

AlertTitle

PropTypeDefaultDescription
classstring-Additional CSS classes

AlertDescription

PropTypeDefaultDescription
classstring-Additional CSS classes