Alert
Callouts in info, success, warning, destructive and neutral tones — with actions, inline actions and dismiss.
2 files · 79 locdeps: clsx, tailwind-merge
Installation
With the shadcn CLI, pointing at this platform’s registry:
npx shadcn@latest add https://opusui.131199999.xyz/r/alert.jsonOr offline, straight from your opus55 checkout (copies every file it needs):
node ../tailwind_component/opus55/scripts/add.mjs alertUsage
import { Alert } from "@/components/opus/ui/alert";
<Alert tone="warning" title="Trial ends soon" action={<Button size="xs">Upgrade</Button>} />API
| Prop | Type | Default | Description |
|---|---|---|---|
| tone | "info" | "success" | "warning" | "destructive" | "neutral" | "info" | Colour + icon. |
| title / icon | ReactNode | — | Heading; icon={null} hides the icon. |
| action / inlineAction | ReactNode / boolean | — | Buttons below or at the right. |
| closable / onClose | boolean / () => void | — | Dismiss. |