Alert
Alert presents important inline information, success, warning, or error feedback in the content flow.
Purpose
Alert presents important inline information in the content flow. Use semantic variants for information, success, warning, and error feedback that should remain visible while the user continues working.
Inline feedback
Installation
With the Siteplane registry alias configured, add the component and import the installed source from your app.
CLI
pnpm dlx shadcn@4.16.1 add @siteplane/alertImport
import { Alert, AlertAction, AlertDescription, AlertTitle } from "@/components/ui/alert";Need the machine-readable source metadata? View registry JSON.
Usage
Use Alert for persistent information, warnings and errors inside the page flow.
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
export function Example() {
return (
<Alert variant="info">
<AlertTitle>Workspace synced</AlertTitle>
<AlertDescription>All pending updates are available.</AlertDescription>
</Alert>
);
}Examples
Variants, the icon slot, actions and dismissal are compositions of the same primitive.
Variants
With icon
A leading svg child lands in the icon column of the alert grid automatically.
With actions
Dismissible
API Reference
The reference lists the source-owned exports and props that are easy to miss in visual examples. Inherited Base UI props remain available unless the wrapper narrows them.
variantaccepts"default","info","success","warning", and"error".- Use
AlertTitlefor the short summary,AlertDescriptionfor supporting detail, andAlertActionfor optional real Button or link controls. - Use Alert Dialog when a decision must block the workflow.
Motion
Component motion uses the shared Siteplane motion contract. See the global motion guide for provider setup, tokens and reduced-motion behavior.
- Alert has no mount or exit animation.
- Actions use their own Button or link interaction states; do not animate the Alert container locally.
Accessibility
Alertrenders withrole="alert".- Keep the title and description concise so announcements remain useful.
- Do not communicate severity through color alone; the copy must identify the outcome or risk.
- Actions require visible focus and an accessible name.
Implementation Guidance
- Match the variant to the message semantics.
- Use Alert Dialog for blocking confirmation and Toast for transient system feedback.
- Keep native slots, variants, and accessibility behavior intact.