shadcn.io is an independent project built on shadcn/ui
The title Info on an info-tinted alert, with Learn More and Dismiss beside it. No icon and no description. The buttons have no handlers.
Keep it for a short announcement with a next step. A notice that should fade belongs in Sonner. In React, Ark UI will not navigate or dismiss it.
Installation
Anatomy

Usage
<Alert className="max-w-lg" variant="info">
<AlertTitle>Info</AlertTitle>
<AlertAction className="flex gap-2">
<Button size="xs">Learn More</Button>
<Button size="xs" variant="outline">
Dismiss
</Button>
</AlertAction>
</Alert>FAQ
What sits next to the title?
Learn More and Dismiss, in one AlertAction. The alert is variant="info" with a single AlertTitle and no description.
Why is Learn More a default button rather than blue?
Button has no info variant, so Learn More uses the default variant and Dismiss uses outline: the filled button is the one to press. The alert's blue tint already marks the message as information. In the info variant, ghost buttons in AlertAction take the blue hover color if you want a lighter pair.
Does Learn More go anywhere in this demo?
No. It is a Button with size="xs" and no href or click handler. Dismiss is the same size with variant="outline". Wire those yourself if the buttons should navigate or hide the alert.
Where are the buttons positioned?
AlertAction is absolutely positioned at the top right. The alert adds right padding so the title keeps its room. className="flex gap-2" puts the two xs buttons in a row.
API Reference
Alert
Sets variant="info". The rest is on the Alert page.
Button
Sets size="xs" and variant="outline". The rest is on the Button page.





