Brief, dismissible notification messages.
123456789101112123456789101112131415161718192021222324252627282930313233343536| Component/Function | Props/Options | Default | Description |
|---|---|---|---|
Toaster | position?, richColors?, closeButton?, expand?, duration?, visibleToasts?, toastOptions?, theme?, className? | position: "top-right", richColors: true, closeButton: true, expand: true, duration: 4000, visibleToasts: 3, theme: "dark" | Toast container component (required in app layout) |
toast.success() | message, options? | — | Show success toast |
toast.error() | message, options? | — | Show error toast |
toast.info() | message, options? | — | Show info toast |
toast.warning() | message, options? | — | Show warning toast |
toast.message() | message, options? | — | Show default toast |
Toast options:
title? – string. Toast title (optional)description? – string. Toast description (optional)action? – object. Action button: { label: ReactNode, onClick: (event) => void } (optional)cancel? – object. Cancel button: { label: ReactNode, onClick: (event) => void } (optional)duration? – number. Display duration in milliseconds (optional)