Skip to content
GitHub11 stars

A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.

<Dialog>
    <form>
        <DialogTrigger>

Installation

dnx Blazix.Cli add dialog

Usage

<Dialog>
    <DialogTrigger>Open</DialogTrigger>
    <DialogContent>
        <DialogHeader>
            <DialogTitle>Are you absolutely sure?</DialogTitle>
            <DialogDescription>
                This action cannot be undone. This will permanently delete your account and remove your data from our servers.
            </DialogDescription>
        </DialogHeader>
    </DialogContent>
</Dialog>

Composition

Use the following composition to build a Dialog:

Dialog
├── DialogTrigger
└── DialogContent
    ├── DialogHeader
    │   ├── DialogTitle
    │   └── DialogDescription
    └── DialogFooter

Custom Close Button

Replace the default close control with your own button.

<Dialog>
    <DialogTrigger>
        <Render>

No Close Button

Use ShowCloseButton="false" to hide the close button.

<Dialog>
    <DialogTrigger>
        <Render>

Keep actions visible while the content scrolls.

<Dialog>
    <DialogTrigger>
        <Render>

Scrollable Content

Long content can scroll while the header stays in view.

<Dialog>
    <DialogTrigger>
        <Render>

RTL

To enable RTL support in Blazix, see the RTL configuration guide.

Translated with AI for the demo, so it may have mistakes.

<Dialog>
    <form>
        <DialogTrigger>

API Reference

Dialog

ParameterTypeDefault
Open bool false
OpenChanged EventCallback<bool> -
OnOpenChange EventCallback<OpenChangeEventArgs> -
OnOpenChangeComplete EventCallback<bool> -
Modal PopupModal PopupModal.True
DisablePointerDismissal bool false
ChildContent RenderFragment? -

DialogClose

ParameterTypeDefault
Render RenderFragment<PopupTriggerRenderProps>? -
NativeButton bool? -
Disabled bool false
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

DialogContent

ParameterTypeDefault
Render RenderFragment<DialogPopupRenderProps>? -
ShowCloseButton bool true
InitialFocus string? -
FinalFocus string? -
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

DialogDescription

ParameterTypeDefault
Render RenderFragment<PopupRenderProps>? -
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

DialogFooter

ParameterTypeDefault
ShowCloseButton bool false
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

DialogHeader

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

DialogOverlay

ParameterTypeDefault
Class string? -

Other attributes are passed to the element it renders.

DialogTitle

ParameterTypeDefault
Render RenderFragment<PopupRenderProps>? -
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

DialogTrigger

ParameterTypeDefault
Render RenderFragment<PopupTriggerRenderProps>? -
NativeButton bool? -
Disabled bool false
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.