Blazor playground

Nova v3.37.0

Preview

Blazor

Dialog Footer

nv-dialogfooter

The cancel and primary actions at the bottom of a dialog.

Live demo

Leading Icon

nv-dialogfooter shows a cancel button and a primary button in the dialog's footer slot. Name them with cancelLabel and primaryLabel, and use danger for destructive actions. Cancel emits dialogCanceled, which closes an uncontrolled dialog; with controlled, close it in your handler. The primary button emits dialogPrimaryClicked and leaves closing to your application. disabled turns off only the primary button.

Anatomy

The dialog anatomy shows the footer and its actions below the body in the dialog composition.

Usage

Use specific action labels such as Save or Delete, and reserve danger for a destructive primary action. leadingIcon and trailingIcon can support that label. The default slot can replace the two-button layout; custom buttons then need their own action and closing handlers. If dismissal is unavailable, set the footer's undismissable too so it does not offer Cancel. The dialog's undismissable does not block Cancel from a custom slotted footer.

Sources