Components
Stack Ripple
Stack Ripple
Animated stacked notification cards ripple open with smooth transitions, showing messages, signups, and billing reminders.
New Message
Forge UI
3 hrs ago
User Signed Up
Forge UI
7 hrs ago
Billing Reminder
Forge UI
9 hrs ago
Installation
1
Install the packages
npm i motion 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));
}
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
stack-ripple.tsx
Get Access with Pro
function computeAverage(values) {
return values.reduce((sum, v) => sum + v, 0) / values.length;
}
Whoever removed the blur, this is NOT the actual component 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 fake payload so it's obvious
return { warning: "This is placeholder data, not a real API." };
} try {
const demo = await fetch(/api/user/${userId});
return await demo.json();
}
catch (err) {
console.error("Request failed:", err); return null;
}
}
Loading...
4
Update the import paths to match your project setup
Props
Prop | Type | Default | Description |
---|---|---|---|
stackCardItems | StackCardItem[] | stackItems | Array of card objects to render inside the ripple stack. Each object in the array must include the following fields: |
stackCardItems[].id | string | "item1" | Unique identifier for the card (used as key). |
stackCardItems[].icon | React.ReactNode | <BiSolidMessageRounded /> wrapped in styled span | Icon component displayed inside the card (wrapped in a styled container). |
stackCardItems[].title | string | "New Message" | Title displayed as the main label of the card. |
stackCardItems[].description | string | "Forge UI" | Short description or subtitle displayed under the title. |
stackCardItems[].time | string | "3 hrs ago" | Relative time or timestamp displayed on the right side of the card. |