Toast
Delivers application-wide, non-blocking feedback through a provider and controller hook.
@rivetui/toastPreview
Explore each composition interactively, then open its code in the same context.
Success feedback
Confirm completed work without interrupting the current task.
Production deployment
Publish the current revision and receive non-blocking feedback.
Priority and tone
Use persistent, assertive feedback only for failures that require attention.
Urgent failures use assertive announcements and remain visible until dismissed.
Registry
Installation
Add the component source and its declared dependencies with the shadcn CLI.
Install component
bunx --bun shadcn@latest add @rivetui/toastPublic interface
API reference
Component-specific props are listed here. Native element and Base UI props continue to pass through.
ToastProvider
| Prop | Type | Default |
|---|---|---|
timeout | number | 5000 |
limit | number | 3 |
Toast options
| Prop | Type | Default |
|---|---|---|
title | ReactNode | — |
description | ReactNode | — |
type | "success" | "warning" | "error" | string | — |
priority | "low" | "high" | "low" |
timeout | number | 5000 |
useToast
| Member | Type | Default |
|---|---|---|
add | (options) => string | — |
update | (id, options) => void | — |
close | (id?) => void | — |
promise | (promise, states) => Promise | — |