N
feedback toast

Toast

Global toast stack via x-sync — the canonical pattern.

$ ndui add toast
Component docs

Server-raised toasts (Alpine AJAX sync block)

Submitting reloads the page for this demo; in a real app toasts arrive via the _ToastContainer sync block on every Alpine AJAX response.
Source
public IActionResult OnPostSave(ProductEditModel m)
{
    _products.Save(m);
    this.AddToast("Product saved.", ToastLevel.Success);
    return this.PageOrPartial("_ProductsTable", _products.List());
}

@* No per-form wiring — _ToastContainer refreshes on every Alpine AJAX
   response because it's registered as a sync block in Program.cs. *@