Alert demo
spectrumui/alert-1FreeComponent
component for the alert-demo
Install it
npx shadcn@latest add https://ui.spectrumhq.in/r/alert-1.jsonSource
1"use client";23import { Alert } from "@/components/ui/alert";4import { cn } from "@/lib/utils";5import { motion } from "framer-motion";6import { PartyPopper } from "lucide-react";78interface Alert04Props {9 className?: string;10}1112export default function Alertdemo({ className }: Alert04Props) {13 return (14 <motion.div15 initial={{ opacity: 0, y: -8 }}16 animate={{ opacity: 1, y: 0 }}17 className={cn("w-full max-w-xl mx-auto", className)}18 >19 <Alert20 className={cn(21 "relative overflow-hidden",22 "bg-linear-to-b from-violet-50 to-white",23 "dark:from-violet-950/20 dark:to-zinc-950",24 "border border-violet-100 dark:border-violet-900/50",25 "shadow-[0_1px_6px_0_rgba(139,92,246,0.06)]",26 "rounded-xl p-4",27 className,28 )}29 >30 <div className="flex items-center gap-4">31 <motion.div32 initial={{ rotate: -15, scale: 0.5 }}33 animate={{ rotate: 0, scale: 1 }}34 transition={{35 type: "spring",36 stiffness: 300,37 damping: 20,38 }}39 >40 <div41 className={cn(42 "p-2.5 rounded-xl",43 "bg-linear-to-br from-fuchsia-500 via-violet-500 to-indigo-500",44 "dark:from-fuchsia-600 dark:via-violet-600 dark:to-indigo-600",45 )}46 >47 <PartyPopper className="h-5 w-5 text-white" />48 </div>49 </motion.div>5051 <div className="space-y-1">52 <motion.h353 initial={{ opacity: 0, x: 20 }}54 animate={{ opacity: 1, x: 0 }}55 transition={{ delay: 0.1 }}56 className={cn(57 "font-medium",58 "text-violet-900 dark:text-violet-100",59 )}60 >61 Amazing milestone! 🎉62 </motion.h3>63 <motion.p64 initial={{ opacity: 0, x: 20 }}65 animate={{ opacity: 1, x: 0 }}66 transition={{ delay: 0.2 }}67 className={cn("text-sm", "text-violet-600 dark:text-violet-300")}68 >69 You've just hit 1,000 followers on your journey!70 </motion.p>71 </div>72 </div>7374 {/* Confetti effect */}75 <div className="absolute inset-0 pointer-events-none">76// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from spectrumui
All 182 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | spectrumui | Components | Free | no deps | |
| Alert 2alert-2 | spectrumui | Components | Free | no deps | |
| Alert 3alert-3 | spectrumui | Components | Free | 1 dep | |
| Alert 4alert-4 | spectrumui | Components | Free | 1 dep | |
| Animated Cardanimated-card | spectrumui | Components | Free | 1 dep · 2 files | |
| Animated Draweranimated-drawer | spectrumui | Components | Free | 4 deps | |
| Animated SVG Chartanimated-SVG-chart | spectrumui | Components | Free | 1 dep | |
| Animated Switchanimated-switch | spectrumui | Components | Free | 1 dep |
