Alert
shadcn/uiDisplays a callout for user attention.
Installation
Props
<Alert />
Name
Type
className
string
variant
"default" | "destructive"
<AlertTitle />
Name
Type
className
string
<AlertDescription />
Name
Type
className
string
Search for a command to run...
Displays a callout for user attention.
import { Alert, AlertTitle, AlertDescription } from "@/registry/optics/alert";import { Terminal, AlertCircle } from "lucide-react";<Alert> <Terminal /> <AlertTitle>Heads up!</AlertTitle> <AlertDescription> You can add components to your app using the CLI. </AlertDescription></Alert><Alert variant="destructive"> <AlertCircle /> <AlertTitle>Error</AlertTitle> <AlertDescription> Your session has expired. Please log in again. </AlertDescription></Alert>import { Alert, AlertTitle, AlertDescription } from "@/registry/optics/alert";import { Terminal, AlertCircle } from "lucide-react";<Alert> <Terminal /> <AlertTitle>Heads up!</AlertTitle> <AlertDescription> You can add components to your app using the CLI. </AlertDescription></Alert><Alert variant="destructive"> <AlertCircle /> <AlertTitle>Error</AlertTitle> <AlertDescription> Your session has expired. Please log in again. </AlertDescription></Alert>