Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Standard with Title and Description Alert for Vue

A neutral alert with the title Success and a sentence that the changes were saved. No icon, no buttons, and no colored border.

UI library: Ark UI

The title Success and the sentence that the changes were saved. No icon, no buttons, and no colored border.

Use it for a general update that needs one sentence and no urgency. A status that should fade fits Sonner. In Vue, Ark UI leaves this on the page.

Preview

Preview width

Installation

MCP · Pro
Make your AI a shadcn expert
Your agent installs components, builds pages and restyles your app from one prompt, in Claude Code, Cursor or VS Code.
Part of Pro

Anatomy

Alert anatomy: root, icon, title, description, action

Usage

<Alert class="max-w-lg">
  <AlertTitle>Success</AlertTitle>
  <AlertDescription>Your changes have been saved successfully.</AlertDescription>
</Alert>

FAQ

When do standard alerts need descriptions?

When the title tells the reader something happened but not what it means for them. One sentence on what changed or what to do next is usually enough; if the title already says it, leave the description out.

How long should standard alert descriptions be?

One or two sentences. AlertDescription wraps as needed, but a long paragraph turns a notice into an article; link to the details instead.

Should I use standard or info alerts for general announcements?

Info when you want the announcement to stand out with its blue tint, standard when it should sit quietly in the page. If the page already has colored alerts, the default variant keeps this one from competing.

Should standard alerts with descriptions be dismissible?

If the information is only useful once, yes. The Alert has no built-in dismiss: keep its visibility in your own state and put a button in AlertAction that hides it.

Can I style description text differently from title?

It already is: AlertTitle uses the regular text color with more weight, and AlertDescription uses the muted color at the regular weight. Pass a className to either part to change it, with theme tokens such as text-foreground.

How should standard alerts with descriptions adapt for mobile?

They need no changes: the alert takes the full width of its container and the description wraps. The demo caps the width with max-w-lg, which narrower screens simply don't reach.

API Reference

Alert

No extra props in this demo. The rest is on the Alert page.