Toast Stack

Toasts that fold into a stack, fan out on hover, drain a tide line and swipe away. Call toast() anywhere.

no dependenciesMIT · free

    Installation

    npx shadcn@latest add https://ombakui.com/r/toast-stack.json

    Usage

    import { Toaster, toast } from "@/components/toast-stack";
    
    // once, e.g. in app/layout.tsx
    <Toaster position="bottom-right" />
    
    // anywhere
    toast("Changes saved", { description: "Your profile is up to date." });
    toast.success("Payment received");
    toast.error("Upload failed", { duration: 6000 });

    Props

    PropTypeDefaultDescription
    position"bottom-right" | "bottom-left" | "top-right" | "top-left" | "bottom-center" | "top-center""bottom-right"Corner the stack sits in.
    visiblenumber3How many toasts stay visible; older ones fold behind.
    classNamestring–