What is the difference?
Alert vs Toast
The difference is permanence and place. An inline alert sits inside the page next to what it concerns and stays until the problem is resolved, so the user can come back and read it again. A toast floats above the interface and dismisses itself after a few seconds, with no way to bring it back.
Ask yourself one question
Will the user need to read this message again a minute from now?
اشتراك الفريق ينتهي بعد ٣ أيام. جدّده من صفحة الفوترة.
تنويه: تغيير الاسم لا يغيّر رابط المساحة.
Alert
التنبيهrole="alert"Use it when
A field error, a warning about account status, or any message tied to something still on screen that needs fixing.
Full entryتم حذف «تقرير-الربع.pdf»
Toast
الإشعار العائمrole="status"Use it when
Confirming an action that finished, or announcing a background event. Passing information that costs nothing if missed.
Full entryThe classic mistake
Showing form validation errors as toasts. The user reads "field required", the toast disappears, and they are left staring at a form with nothing marking which field it meant.
Other comparisons