Toast

macOS notifications: glass banners at the top right that slide in and stack.

Installation

pnpm dlx shadcn@latest add @cupertinoui/toast

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { toast, Toaster } from "@/components/ui/toast"

// Once, around your app:
<Toaster>{children}</Toaster>

toast.add({ title: "Backup Complete", description: "…", type: "success" })
Built on Base UI's Toast: hover the stack to expand it, swipe a notification away, and use toast.promise for work that finishes later. type picks the symbol: success, info, warning, error or loading.

API Reference

Every part forwards the props of the underlying Base UI Toast part. The props below are the ones CupertinoUI adds or changes.

Toaster

PropTypeDescription
toastManagerToastManager
Default: toast
The manager that toast.add talks to; make more with createToastManager.
limit / timeoutnumberHow many show at once, and how long each stays.
classNamestringExtra classes, merged with the component's own.