017
Alert
FeedbackHeads up
Registry items are copied into your project as source.
Customize
Tone
Description
Code
<Alert> <AlertTitle>Heads up</AlertTitle> <AlertDescription>Registry items are copied into your project as source.</AlertDescription> </Alert>
Install
npx shadcn@latest add https://components.haedong.dev/r/alert.json
Props
Alert extends the native div props; AlertTitle and AlertDescription are paragraphs. Errors and warnings render role="alert", info and success role="status".
| Prop | Type | Description |
|---|---|---|
| tone | "info" | "success" | "warning" | "error" | Prefix i / OK / ? / !. Error also turns the hairline dashed and full-strength. Defaults to "info". |
| className | string | Extra classes for the box (width). |