Toast preview

Toast

Brief notices that stack in a corner, fan out on hover, pause while you read and swipe away. Call toast() from anywhere.

  • Group
    Messages
  • Origin
    Inspired · Original (this library)
  • License
    MIT
  • Added
    Oct 22
npx shadcn@latest add @deank/toast

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { Toaster } from "@/registry/components/toast/toast";

<Toaster />

Props

PropTypeDefaultDescription
position?"bottom-right" | "bottom-left" | "top-right" | "top-left" | "bottom-center" | "top-center""bottom-right"Corner the stack sits in
visible?number3How many toasts stay visible; older ones are dropped from view
contained?booleanfalseRender inside the nearest positioned parent instead of the viewport (useful for demos)
className?string

When to use

Confirming an action that already happened (saved, copied, sent) or reporting a background result, optionally with an Undo action.

When not to use

Errors that block the task or need a decision (use dialog or inline errors in text-field); persistent announcements (use notification-stack).

Related

Notification stack · Dialog · Button