Alert
bundui/alert-with-dismissFreeComponent
Displays a callout for user attention.
Live preview
live · rendered by the registry
Rendered by bundui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://bundui.io/r/alert-with-dismiss.jsonSource
1"use client";23import { useState } from "react";4import { CheckCircle2Icon, XIcon } from "lucide-react";56import { Alert, AlertTitle } from "@/components/ui/alert";7import { Button } from "@/components/ui/button";89export default function AlertWithDismiss() {10 const [show, setShow] = useState(true);1112 if (!show) return null;1314 return (15 <Alert className="flex items-center justify-between">16 <div className="flex gap-3">17 <CheckCircle2Icon className="mt-0.5 size-4" />18 <AlertTitle>Success! Your changes have been saved</AlertTitle>19 </div>20 <Button variant="ghost" size="icon-sm" onClick={() => setShow(false)}>21 <XIcon />22 </Button>23 </Alert>24 );25}
What it pulls in
npm packages
Other registry items
Files it writes
More from bundui
All 217 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion-collapsible | bundui | Components | Free | no deps · 2 files | |
| Accordionaccordion-default | bundui | Components | Free | no deps | |
| Accordionaccordion-with-plus-icon | bundui | Components | Free | 2 deps | |
| Alertalert-danger | bundui | Components | Free | 1 dep | |
| Alertalert-default | bundui | Components | Free | no deps | |
| Alert Dialogalert-dialog | bundui | Components | Free | no deps | |
| Alertalert-success | bundui | Components | Free | 1 dep | |
| Alertalert-warning | bundui | Components | Free | 1 dep |
