Alert Inline Variants
Inline alerts in info, success, warning and error tones with an optional action; dismissing one blurs it out and the stack closes the gap on a spring.
alertinlinevariantsdismissstatus
Installation
Run the shadcn CLI in a project with Tailwind CSS. The component lands in components/pixelpapa/alert-inline-variants.tsx.
$pnpm dlx shadcn@latest add "https://pixelpapa.com/r/alert-inline-variants.json"Manual install+
1. Install the dependencies.
$pnpm add lucide-react motion2. Copy the code from the Code tab above into your project. It imports the cn helper from @/lib/utils, which every shadcn project already has.
Build it with AI
Prefer to let an agent do the wiring? Copy this prompt, describe where the component should go, and paste.
AI prompt
Paste into Claude, Cursor, v0 or Lovable
Add the "Alert Inline Variants" component from PixelPapa UI to this project. What it is: Inline alerts in info, success, warning and error tones with an optional action; dismissing one blurs it out and the stack closes the gap on a spring. Category: Notifications. Depends on: lucide-react, motion. 1. Install it with the shadcn CLI: npx shadcn@latest add "https://pixelpapa.com/r/alert-inline-variants.json" (If the CLI is unavailable, fetch that URL, write files[0].content to components/pixelpapa/alert-inline-variants.tsx and install the listed dependencies.) 2. Import it from "@/components/pixelpapa/alert-inline-variants" and place it where I describe below. 3. Keep its animation timings and accessibility attributes. Replace the demo copy and data with content that fits my product, and use my existing theme tokens (bg-background, text-foreground, bg-primary, border-border) rather than hard-coded colours. Where to use it: <describe the page and position here>
More notifications
- Notification Dynamic IslandA pill that springs between sizes to hold live activities (an incoming call, a timer, now playing) with content that blurs across each morph.
- Notification Inbox PopoverA bell popover with Unread and All tabs: marking a row read drains its dot and folds it out of the unread list while the badge count rolls down.
- Notification List SwipeNotification rows you can swipe: right to archive, left to delete. The action underneath grows with the drag, and a flick or a long pull sends the row flying before the list closes up.
- Toast Stack Sonner LikeA hand-built toaster: toasts pile into a tight stack, fan out into a readable list on hover, pause their timers while you look, and promise toasts morph from loading to done.
- Toast Undo ProgressAn undo toast with a draining countdown bar that pauses on hover; undo springs the removed row back into the list, and letting it run out commits the action.