Toast
Base UIA short message that announces itself and goes away.
Install
$ npx shadcn@latest add https://spotcheckui.com/r/toast.jsonAlso installs @base-ui/react.
Usage
import { ToastProvider, toast } from "@/components/spotcheck/toast"
// Wrap your app once.
<ToastProvider>{children}</ToastProvider>
// Then call it from anywhere.
toast.add({ title: "Saved", description: "support-qa is up to date." })Screen readers hear each toast as it arrives.
Props
- timeout
numberDefault 5000How long a toast stays, in milliseconds.
Keyboard
| F6 | Move focus into the toasts |
|---|---|
| Tab | Reach the dismiss button |
| Esc | Dismiss the focused toast |
Reduced motion
Toasts appear without their short rise.