About
A stack of toast notifications that fans out into a list on hover or focus, can be swiped away, and auto-dismisses on a per-toast countdown.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Toast Stack to your project and fits it to your theme.
Code
How Toast Stack is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import ToastStack, { useToastStack } from "@/components/ui/toast-stack";
export default function ToastStackDemo() {
const { toasts, push, dismiss } = useToastStack();
return (
<div className="flex min-h-[420px] w-full flex-col items-center justify-center gap-6 bg-[#f5f5f7] p-8 dark:bg-black">
<button
type="button"
onClick={() =>
push(
{
title: "Changes saved",
description: "Your profile was updated.",
type: "success",
action: { label: "Undo" },
},
{ sound: true },
)
}
className="rounded-full bg-[#1d1d1f] px-5 py-2.5 text-[13px] font-medium text-white transition-colors hover:bg-[#1d1d1f]/90 dark:bg-white dark:text-[#1d1d1f] dark:hover:bg-white/90"
>
Add toast
</button>
<ToastStack toasts={toasts} onDismiss={dismiss} position="bottom" />
</div>
);
}







