YYonda UI Docs

Toast

Feedback notification for form submissions, wishlist changes, price alerts, session state, and any async action result. Built on Radix Toast — inherits swipe-to-dismiss, focus management, hotkey-to-focus (F8), and auto-dismiss timing. Five semantic variants map to the platform's status token palette.

    Usage notes

    • — Mount ToastProvider + ToastViewport once at the app shell root. Every subsequent Toast renders into that viewport regardless of where in the tree it lives.
    • — Variants map to the platform's semantic status palette: success / destructive / info / warning / default. Colors auto-adapt to dark mode.
    • — duration is a per-toast Radix prop; default 5000ms. Set to Infinity for sticky toasts (e.g. destructive errors requiring user acknowledgement).
    • — ToastAction requires an altText — Radix uses it for the aria-label so screen reader users hear the action even before the visual button appears.
    • — Swipe-to-dismiss works on touch devices; direction configured via ToastProvider swipeDirection prop.
    • — Follow-up: a useToast() hook to enable imperative toast({ title, description, variant }) calls without managing open state per call site. Ships in a separate PR once a real consumer needs it.