A callout in a dithered frame, with a heavier frame and ✖ mark for destructive alerts.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
Code
"use client";
import { Alert, AlertDescription, AlertTitle } from "@/registry/ui/alert";
export default function AlertDemo() {
return (
<div style={{ display: "grid", gap: 12, width: "min(440px, 100%)" }}>
<Alert>
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>You can add components with the shadcn CLI.</AlertDescription>
</Alert>
<Alert variant="destructive">
<AlertTitle>Payment failed</AlertTitle>
<AlertDescription>Check your card details and try again.</AlertDescription>
</Alert>
</div>
);
}
































