Skip to Content
Kokonut UI

CD-08Cards

Notification Stack

Stacked notifications that fan out on hover and swipe away, built with React and Tailwind CSS.

Install with
lucide-react

PROOnboarding Checklist and more like it are in Kokonut UI Pro

Installation

Notification Stack is a free, open-source React component in the Kokonut UI Cards collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/notification-stack.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/notification-stack

Or add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/notification-stack.tsx.

npm install lucide-react

Usage

import NotificationStack from "@/components/kokonutui/notification-stack";

export default function Example() {
  return <NotificationStack />;
}

Props

notifications
StackNotification[]Default built-in

Initial notifications, newest first. The stack tracks dismissals itself.

onDismiss
(id: string) => void

Called after a notification has been swiped or clicked away.

className
string

Extra classes for the root element.

StackNotification

idrequired
string
apprequired
string
titlerequired
string
bodyrequired
string
timerequired
string
icon
ReactNode

Dependencies

NeedsVersionComes from
lucide-react^0.556.0npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.