Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

Alert

Displays a callout for user attention.

Installation

npx logic2b@latest add alert

Usage

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

<Alert variant="destructive">
  <AlertTitle>Error</AlertTitle>
  <AlertDescription>Something went wrong.</AlertDescription>
</Alert>

API

Prop Type Default
variant (Alert) default | destructive default

An optional leading svg icon is placed in its own column automatically. AlertTitle and AlertDescription accept the standard div props.

Examples

With icon

Drop a Lucide icon as the first child to render it alongside the title.

Destructive

Use variant="destructive" to signal an error state.