Default
Use s-dialog and its slots to compose a custom interface. Give form inputs the block prop to fill the available width.
Use s-dialog and its slots to compose a custom interface. Give form inputs the block prop to fill the available width.
You can easily create the most common types of dialogs such as Alert, Confirm or Prompt using the different slots for the structure of the header,default, footer dialog
Add a loading animation to the dialog with the loading property
Use not-close to hide the top-right close button. Other dismissal methods remain controlled by their respective settings.
There are cases where you need a scroll because there is a lot of information within the dialog for this you can use the scroll property
If you need to remove the page scroll when opening the dialog you can do it with the lock-scroll property
If you need to remove the padding from the dialog to make a more personalized interface you can do it with the not-padding property
You can nest as many s-dialog as you need without problem
full-screen dialogs expose minimization by default; set :minimizable="false" to hide it. Minimization preserves content and form state without changing v-model, releasing the mask and scroll lock. Dock bubbles can restore or close dialogs, respecting before-close; multiple bubbles appear together. Use minimized-label to name the bubble.
You can add a blur style to all the elements behind the dialog with the overlay-blur property, this functionality depends on the css property backdrop-filter
Change the dialog style by removing the border radius and making it rectangular
Set prevent-close to block closing by clicking the overlay or pressing Escape. Close buttons, confirmation/cancellation actions, and programmatic requests still follow their own closing configuration and the before-close guard.
Customize the action layout with the footer slot. Its confirm and cancel callbacks preserve the confirmation and cancellation flow; pending, closePending, and disabled synchronize buttons and status feedback. This example uses confirm-closable="false" to stay open after asynchronous confirmation so you can observe events. Cancel closes the dialog.
The closing dissolve defaults to 220ms. Set close-animation-duration in milliseconds; 0 finishes immediately. Imperative calls and global Dialog configuration use closeAnimationDuration. The surface and overlay are removed together when dissolution finishes, without an additional overlay fade.
Dialogs close with an SVG particle dissolve by default. Set :close-animation="false" to disable it. Only the surface or minimized bubble is filtered; the overlay stays unchanged during the dissolve. With before-close, dissolution begins after approval and loading completion. Rejected closing does not animate. Imperative calls also accept closeAnimation: false. Reduced motion and hidden pages skip the dissolve.
With before-close, overlay clicks do nothing by default. Explicitly set :mask-closable="true" on this instance to let them request closing and run the guard. Neither the component default nor global dialog.maskClosable enables this entry. Close buttons, Escape, confirmation/cancellation, and programmatic requests still follow their existing configuration.
before-close is () => Promise<void> and takes no callback argument. Return Promise.resolve() or fulfill an async function to continue closing. Promise.reject('reason') or a thrown Error blocks closing and displays its reason. Close buttons, overlay clicks, Escape, cancellation, closing after confirmation, dock bubbles, instance close(), and controlled v-model close requests use the same check. Minimizing does not run it.
While pending, the dialog and overlay stay mounted, close buttons show loading, and repeated requests share one check. Rejecting a controlled close emits v-model=true to restore visibility. Use close-error for logging; custom footers receive closePending. Results from an unmounted or reopened instance cannot close a new instance or display a stale notification. SDialogBox also waits for actual closing and disposal before settling its outer Promise. The close indicator finishes its lead-in, then its colored strands clear at four points before the dialog exits. Confirmation buttons retain the default logo restoration. Instant checks that never show a loader add no wait; reduced-motion mode and hidden pages finish the visual motion immediately.
By default, dialogs and bubbles are disposed with their owner. Set global when creating the instance to retain the same dialog after its owner unmounts, until the user closes it; page reloads do not preserve it. Changing global at runtime does not migrate an instance. Retained dialogs keep their slots, injected context, and callbacks but stop receiving owner prop updates after unmount. Callers own callback references, asynchronous tasks, and subscriptions, and must avoid accessing destroyed page instances.
After app.use(SaxDesignVue), $dialog is available. Import SDialogBox for direct calls, or install it with app.use(SDialogBox) to bind the application context.
SDialogBox and $dialog reuse Dialog rendering and lifecycle without a template. alert() resolves an action; confirm() resolves true on confirmation and rejects with cancel or close otherwise. Calling SDialogBox directly resolves confirm, cancel, or close after the closing animation and disposal. Imperative instances own their lifetime; handle confirmation cancellation explicitly.
before-confirm can run SForm.validate() and await asynchronous work. Return false to keep the dialog open. The confirm button shows loading and ignores duplicate requests while pending; stale results after cancellation or close cannot confirm. Handle confirm-error to display business errors. Custom footers receive confirm, cancel, pending and disabled to reuse the same flow.
NumberBooleanBooleanBooleanStringBooleanBooleanBooleanBoolean(error: unknown) => voidBoolean() => Promise<void> | undefined