Command Palette

Search for a command to run...

Alert

Displays a callout for important information, with support for different variants like default and destructive.

Installation

npx shadcn add alert --registry https://ui.ch.sh/r

Usage

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

export default function Example() {
  return (
    <Alert>
      <AlertTitle>Heads up!</AlertTitle>
      <AlertDescription>
        You can add components using the CLI.
      </AlertDescription>
    </Alert>
  )
}

Examples

Destructive