Toast

Growl-style notifications: call toast() and an Alert slides in from the corner.

installnpx shadcn@latest add @aqua/toast

Usage

Mount the Toaster once, near the root of your app:

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

<body>
  {children}
  <Toaster />
</body>

Then fire notifications from anywhere with toast():

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

toast({
  title: "Software Update",
  description: "Mac OS X 10.4 “Tiger” is available.",
})

toast({ variant: "destructive", title: "Disk not ejected properly" })

Toasts dismiss themselves after five seconds (tune with duration), or on the little Aqua close pearl that shows on hover. Installing @aqua/toast pulls in @aqua/alert automatically, so the three variants match your inline alerts.