Components/Feedback
Inline messages for info, success, warning and errors.
Useslucide-react
Your trial ends in 3 days
Add a payment method to keep your projects online after October 14.
Deployment ready
acme-web is live on acme.dev and 2 preview URLs.
You’ve used 90% of your build minutes
Builds will queue once you reach 6,000 minutes this cycle.
Payment failed — update your card
We couldn’t charge the Visa ending in 4242. Your workspace pauses on October 18.
Scheduled maintenance on Sunday, 02:00–02:30 UTC
Installation#
npx shadcn@latest add https://get-neonkit.vercel.app/r/alert.jsonUsage#
import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert"
<Alert status="success">
<AlertTitle>Deployment ready</AlertTitle>
<AlertDescription>acme-web is live on acme.dev.</AlertDescription>
</Alert>Examples#
Action and dismiss
The action inherits the alert's color, so a Button in it matches without props.
Payment failed
The Visa ending in 4242 was declined.
Variants
Deployment ready
Built in 38s and promoted to production.
Deployment ready
Built in 38s and promoted to production.
Deployment ready
Built in 38s and promoted to production.
Custom color and icon
color overrides the status color. icon={false} hides the icon.
Border Beam just landed
Trace any card with a moving line of light. One file, no dependencies.
You’re viewing a read-only snapshot from September 30.
API reference#
Alert
Also accepts every native div attribute.
| Prop | Type | Default |
|---|---|---|
status | "info" | "success" | "warning" | "error" | "neutral"Sets the default color, icon and role. | "info" |
variant | "soft" | "outline" | "solid"Visual style. | "soft" |
color | NeonColorPalette name or hex. Overrides the status color. | from status |
icon | ReactNode | falseReplaces the icon, or hides it with false. | status icon |
action | ReactNodeRight-aligned slot, usually a small Button. | — |
onDismiss | () => voidShows a dismiss button that calls this. Removing the alert is up to you. | — |
AlertTitle
A div with the title style. Accepts every native div attribute.
| Prop | Type | Default |
|---|
AlertDescription
A div with the muted body style. Accepts every native div attribute.
| Prop | Type | Default |
|---|
Accessibility#
- warning and error render role="alert" so they are announced immediately; the other statuses use role="status".
- Render a live alert in response to an event; one present on page load may not be announced.
- The dismiss button is a native button labelled "Dismiss", reachable with Tab.