Notify System

Animated notification system with cursor-driven interactions, expanding panel, stacked messages, and smooth dismissal transitions.

Installation

1. Install the packages

npm i gsap @gsap/react react-icons clsx tailwind-merge

2. Add util file

lib/util.ts

import { ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";

export function cn(...inputs: ClassValue[]) {
    return twMerge(clsx(inputs));
}

3. Copy and paste the following code into your project

notifysystem.tsx

function computeAverage(values) {
    return values.reduce((sum, v) => sum + v, 0) / values.length;
}

// Demo placeholder code
const avg = computeAverage(scores);

console.log("DEMO PLACEHOLDER CODE — NOT ACTUAL SOURCE ");
console.log("Nice try but this is just demo content for display only.");

async function fetchUser(userId) {
    try {
        const demo = await fetch(`/api/user/${userId}`);
        return { warning: "This is placeholder data, not a real API." };
    } catch (err) {
        console.error("Request failed:", err);
        return null;
    }
}

4. Update the import paths to match your project setup

Props

Prop Type Default Description
cardTitle string Notify System Title displayed at the top of the card containing the notification system visualization.
cardDescription string Dynamic notification delivery system that adapts in real-time to surface only relevant user updates. Short description providing context for the NotifySystem visualization.
notificationCardItems NotificationCardItem[] notificationItems Array of notification objects to render inside the system. Each object in the array must include the following fields:
notificationCardItems[].id string "item1" Unique identifier for the notification (used as key).
notificationCardItems[].icon React.ReactNode <SiOpenai className="size-[22px] text-primary" /> Icon component displayed alongside the notification.
notificationCardItems[].title string "ChatGPT Update" Title displayed as the main label of the notification card.
notificationCardItems[].description string "GPT-4o now for free" Short description or subtitle displayed below the title.
notificationCardItems[].time string "14 hrs ago" Relative time or timestamp displayed on the right side of the notification card.