Part of the
igniteui-blazor-componentsskill hub. For project setup and module registration - seesetup.md.
This reference gives high-level guidance on feedback and overlay components, their key features, and common API members. For detailed documentation, call get_doc from igniteui-cli; use search_api and get_api_reference for Blazor API details.
Docs: Dialog
builder.Services.AddIgniteUIBlazor(typeof(IgbDialogModule));<IgbButton @onclick="OpenDialog">Open Dialog</IgbButton>
<IgbDialog @ref="ConfirmDialog"
Title="Delete Item"
KeepOpenOnEscape="false"
CloseOnOutsideClick="false">
<p>Are you sure you want to delete this item? This action cannot be undone.</p>
<IgbButton slot="footer" Variant="@ButtonVariant.Flat" @onclick="CloseDialog">Cancel</IgbButton>
<IgbButton slot="footer" Variant="@ButtonVariant.Contained" @onclick="ConfirmDelete">Delete</IgbButton>
</IgbDialog>
@code {
public IgbDialog ConfirmDialog { get; set; }
Task OpenDialog() => ConfirmDialog.ShowAsync();
Task CloseDialog() => ConfirmDialog.HideAsync();
async Task ConfirmDelete()
{
await ConfirmDialog.HideAsync();
// perform delete
}
}Key attributes: Title, KeepOpenOnEscape (default: false; set true to prevent closing on ESC), CloseOnOutsideClick (default: false), Open, HideDefaultAction.
Slots: footer (action buttons). The default slot is the dialog body.
Methods: ShowAsync(), HideAsync(), ToggleAsync().
Events: Opening (cancellable), Opened, Closing (cancellable), Closed.
CSS parts: base, title, footer, content.
Docs: Snackbar
builder.Services.AddIgniteUIBlazor(typeof(IgbSnackbarModule));<IgbButton @onclick="ShowMessage">Save</IgbButton>
<IgbSnackbar @ref="Snack"
DisplayTime="3000"
ActionText="Undo"
Action="OnUndo">
Changes saved successfully.
</IgbSnackbar>
@code {
IgbSnackbar Snack { get; set; }
async Task ShowMessage()
{
await Snack.ShowAsync();
// or use JS interop shortcut: id="snackbar" + onclick="snackbar.show()"
}
void OnUndo(IgbVoidEventArgs e) { /* undo logic */ }
}Key attributes: DisplayTime (ms, default 4000; 0 keeps it open), KeepOpen (overrides DisplayTime), ActionText (text for the action button).
Methods: ShowAsync(), HideAsync().
Events: Action - fires when the action button is clicked.
CSS parts: base, message, action, action-container.
TIP - JS interop shortcut: Add
id="snackbar"toIgbSnackbarandonclick="snackbar.show()"to the trigger button as a lightweight alternative when you don't need C# event handling.
Docs: Toast
builder.Services.AddIgniteUIBlazor(typeof(IgbToastModule));<IgbButton @onclick="ShowToast">Show Toast</IgbButton>
<IgbToast @ref="ToastRef" DisplayTime="4000">
Operation completed successfully.
</IgbToast>
@code {
IgbToast ToastRef { get; set; }
Task ShowToast() => ToastRef.ShowAsync();
}Key attributes: DisplayTime (ms), KeepOpen.
Methods: ShowAsync(), HideAsync().
AGENT INSTRUCTION - Toast vs Snackbar:
IgbToastis a simple auto-dismissing notification with no action button. UseIgbSnackbarwhen you need an action button (e.g., "Undo"). Check the doc viaget_docfor the current difference, as these components evolve.
Docs: Banner
builder.Services.AddIgniteUIBlazor(typeof(IgbBannerModule));<IgbBanner @ref="BannerRef">
<IgbIcon slot="illustration" IconName="wifi_off" Collection="material" />
You are currently offline.
<IgbButton slot="actions" @onclick="RetryConnection">Retry</IgbButton>
</IgbBanner>
<IgbButton @onclick="ShowBanner">Show Banner</IgbButton>
@code {
IgbBanner BannerRef { get; set; }
Task ShowBanner() => BannerRef.ShowAsync();
void RetryConnection() { /* retry logic */ }
}Slots: illustration (icon or image), actions (buttons shown at the right or bottom). Default slot = message text.
Methods: ShowAsync(), HideAsync(), ToggleAsync().
Events: Opening (cancellable), Opened, Closing (cancellable), Closed.
CSS parts: spacer, message, illustration, actions.
- Use
@refto obtain a component reference, then callShowAsync()/HideAsync()on it from C# code. IgbDialog.KeepOpenOnEscapeisfalseby default. Set it totrueto force users to use your footer buttons instead of ESC.IgbDialog.CloseOnOutsideClickisfalseby default - set it totruefor light-dismiss dialogs.IgbSnackbar.DisplayTime="0"keeps it open untilHideAsync()is called. UseKeepOpenfor the same effect.- Footer buttons in
IgbDialogmust useslot="footer". Without the slot, they render in the body. IgbBanneris inline (pushes content down) whileIgbDialogis a modal overlay. Use banners for persistent, low-urgency messages and dialogs for confirmations or blocking actions.