Toast

Toast notifications with a toast() API for success, error, warning and promise states. The Toaster stacks cards, fans them out on hover and pauses timers.

src/registry/ui/toast.tsx/r/toast.json

    Click to fire, hover the stack to expand

    Installation#

    bash
    npx shadcn@latest add @minidev/toast
    

    MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/toast.json

    Usage#

    tsx
    import { Toast } from "@/components/ui/toast"
    
    export function Example() {
      return (
        <Toast title="Saved" description="Changes are live." tone="success" />
      )
    }
    

    API reference#

    Toast props
    PropTypeDefault
    title*React.ReactNode-
    descriptionReact.ReactNode-
    toneTone"neutral"
    action{ label: string; onClick: () => void }-
    onDismiss() => void-
    classNamestring-

    * required

    Dependencies#

    npm

    lucide-react

    Built from

    No other MiniDev files

    Examples#

    All alerts, toasts and empty states

    Learn more