eQuantic.UIeQuantic.UI
Docs
Playground
GitHub
DocsOverlays
Dialog
Ver código-fonte
1 min de leitura
A modal decision that interrupts: title, body, and at most two actions.
1
using eQuantic.UI.Components;
DEFAULT
Excluir isto?Essa ação não pode ser desfeita.
confirm + cancel
Usage
1
2
3
4
5
6
new Dialog("Delete card?", "Its automatic payments will stop.")
{
Actions = [ new DialogAction("Keep card", Variant.Ghost, KeepCard),
new DialogAction("Delete", Variant.Destructive, DeleteCard) ],
Dismissible = false,
}
API
Prop
Type
Default
Description
Title
string
—
A question, or a statement of consequence.
Body
string
—
What will happen, concretely.
Actions
DialogAction[]
[]
At most two. A third means this should be a screen.
Dismissible
bool
true
false forces an explicit choice — the default for destructive confirms.
OnDismiss
Action?
null
Scrim tap, Escape, or back.
States
State
Rendering
Entering
Scale and fade over Motion.Enter
Open
Elevated over a scrim, focus trapped
Exiting
Motion.Exit
Accessibility
•
Role alertdialog named by the title and described by the body. Focus returns to the invoker on close.
When to use
•
Irreversible or costly decisions.
Avoid
•
Multi-step forms.
•
Stacked dialogs.
•
Anything a Banner or Toast could carry.
NOTEEvery dimension resolves through Sizing.*(SizeVariant) and the token scales — never a literal. Source: src/eQuantic.UI.Components/Dialog.cs.