Dialog
Overview
A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.
SDialog is the declarative wrapper for inline usage. dialog(...) is the imperative API for creating alert-style dialogs programmatically. It combines the DialogRoot/DialogTrigger/DialogOverlay/DialogPopup/DialogHeader/DialogContent/DialogFooter/DialogTitle/DialogDescription/DialogClose/DialogFullscreen/DialogCancel/DialogConfirm Aria primitive family (zero styles) with the dialogVariants style recipe (12 slots, 6 sizes).
Mount SDialogProvider once near your app root before calling the imperative dialog(...) API.
Usage
Declarative
Imperative API
<script setup lang="ts">
import { h } from 'vue';
import { SButton, SDialogProvider, dialog } from '@vean/ui';
function openWarningDialog() {
dialog.warning('Delete Project', {
description: 'This action cannot be undone.',
content: h('div', 'Please confirm before continuing.'),
confirmText: 'Delete'
});
}
</script>
<template>
<SDialogProvider />
<SButton color="warning" @click="openWarningDialog">Open Dialog</SButton>
</template>Features
- 🧩 Aria/styled split —
DialogCompactaggregates the primitives and composes the overlay/popup/header/content/footer;SDialogonly injects styles and forwards slots/events - 🖱️ Declarative + imperative — inline
SDialogwith a trigger, ordialog.*API driven bySDialogProvider - 🎭 Modal by default —
modalrendersaria-modal,useHideOthers, outside-pointer blocking and focus trapping; toggle withmodal={false} - ⚠️ Alert mode —
isAlertswitches torole="alertdialog", adds the type icon andaria-live(polite/assertive) - 🏷️ Accessible title/description —
title/descriptionwirearia-labelledby/aria-describedby - ❌ Closable —
showCloserenders a close control; Escape, outside pointer/focus and the close button all dismiss - 🖐️ Draggable —
draggablelets you move the dialog by dragging its header (powered byuseDraggablefrom@vueuse/core) - ⛶ Fullscreen —
showFullscreenrenders a toggle;fullscreen/defaultFullscreendrive av-model:fullscreenstate - 🔘 Cancel/confirm —
showCancel/showConfirmwith localizedcancelText/confirmTextfromdialog.cancel/dialog.confirm - 🧹 Pure mode —
puredrops the header/footer for fully custom content - 📐 6 sizes — xs–2xl
size; per-slotuioverrides - ♿ Accessible — real
role="dialog", focus trap + loop, focus restoration on close,axe-corezero violations
Component family
SDialog(styled) — the entry wrapper;dialogVariantsrecipe with dynamic slot forwardingSDialogProvider(styled) — hosts the imperativedialog(...)API; subscribes toDialogStateDialogRoot(Aria) — the state owner;openviauseControllableState,dir/modal,provideDialogRootContextDialogTrigger(Aria) — aButtonthat opens the dialogDialogOverlay(Aria) — the dimmed backdropDialogPopup/DialogPopupImpl(Aria) — the focus-trapped, dismissable surface hosting the dialog bodyDialogTitle/DialogDescription(Aria) — the labelled/described elementsDialogClose(Aria) — the close control, togglesopenand emitscloseDialogFullscreen(Aria) — the fullscreen toggle, toggles thefullscreenstate and emitsfullscreenDialogCancel/DialogConfirm(Aria) — footer actions, emitcancel/confirmDialogHeader/DialogContent/DialogFooter(Aria) — layout sectionsDialogCompact(Aria) — the aggregated composite; composes all primitives and exposes the per-part slots
Demos
Basic
Footer
State
Prevent
Dialog API
Draggable
Fullscreen
API
Aria Layer
19Dialog
Props
| Prop | Type | Default | Description |
|---|---|---|---|
showFullscreen | boolean | false | Whether show the fullscreen toggle button in the header of the dialog. |
class | ClassValue | — | the popup class of the dialog |
size | ThemeSize | — | Visual size of the component. |
ui | Partial<DialogUi> | — | Per-slot class overrides for the component. |
title | string | — | The title of the dialog. This is used for accessibility purposes and will be rendered in the header of the dialog if the `title` slot is not provided. |
description | string | — | The description of the dialog. This is used for accessibility purposes and will be rendered in the content of the dialog if the `description` slot is not provided. |
icon | IconValue | — | The icon of the dialog. This is used for accessibility purposes and will be rendered in the header of the dialog if the `icon` slot is not provided. |
showClose | boolean | true | Whether show the close button in the header of the dialog. |
pure | boolean | false | Whether to use the pure version of the dialog, which does not include the header and footer.
This is useful when you want to fully control the content of the dialog and do not need the built-in header and footer. |
showCancel | boolean | 'onlyWarning' | 'onlyWarning' | Whether to show the cancel button.
When set to `onlyWarning`, the cancel button will only be shown when the dialog is an alert dialog with `alertType="warning"`.
When set to `true`, the cancel button will always be shown. |
cancelText | string | — | The text of the cancel button. This is used for accessibility purposes and will be rendered in the footer of the dialog if the `cancel` slot is not provided.
Defaults to the localized `dialog.cancel` message from `ConfigProvider`. |
showConfirm | boolean | — | Whether to show the confirm button when the dialog is an alert dialog.
The default value is `true` when the dialog is an alert dialog. |
confirmText | string | — | The text of the confirm button. This is used for accessibility purposes and will be rendered in the footer of the dialog if the `confirm` slot is not provided.
Defaults to the localized `dialog.confirm` message from `ConfigProvider`. |
triggerProps | DialogTriggerProps | — | Properties forwarded to the trigger element. |
overlayProps | DialogOverlayProps | — | Properties forwarded to the overlay element. |
portalProps | PortalProps | — | Properties forwarded to the portal element. |
popupProps | DialogPopupProps | — | Properties forwarded to the popup element. |
headerProps | DialogHeaderProps | — | Properties forwarded to the header element. |
contentProps | DialogContentProps | — | Properties forwarded to the content element. |
footerProps | DialogFooterProps | — | Properties forwarded to the footer element. |
titleProps | DialogTitleProps | — | Properties forwarded to the title element. |
descriptionProps | DialogDescriptionProps | — | Properties forwarded to the description element. |
closeProps | DialogCloseProps | — | Properties forwarded to the close element. |
fullscreenProps | DialogFullscreenProps | — | Properties forwarded to the fullscreen element. |
cancelProps | DialogCancelProps | — | Properties forwarded to the cancel element. |
confirmProps | DialogConfirmProps | — | Properties forwarded to the confirm element. |
modal | ModalityTier | true | The modality of the dialog. When set to `true`, interaction with outside elements will be disabled and only dialog
content will be visible to screen readers.
Set to `'trap-focus'` to trap focus while still letting outside pointer events through (non-modal side panels such
as `Drawer` in the `'trap-focus'` tier). |
dir | Direction | — | The text direction of the dialog |
isAlert | boolean | false | Whether the dialog is an alert dialog. An alert dialog is a dialog that interrupts the user's workflow to communicate an important message and requires a response.
When set to `true`, the dialog will have `role="alertdialog"` and will require a `DialogTitle` to be provided. This is used for accessibility purposes. |
alertType | DialogAlertType | — | The alert type of the dialog, which determines the default icon and styles when the dialog is an alert dialog. |
draggable | boolean | false | Whether the dialog can be moved by dragging its header. |
fullscreen | boolean | undefined | The controlled fullscreen state of the dialog. Can be bound with `v-model:fullscreen`. |
defaultFullscreen | boolean | false | The fullscreen state of the dialog when it is initially rendered. Use when you do not need to control its fullscreen state. |
open | boolean | undefined | The controlled open state of the dialog. Can be bound with `v-model:open`. |
defaultOpen | boolean | false | The open state of the dialog when it is initially rendered. Use when you do not need to control its open state. |
Emits
| Emit Name | Parameters | Description |
|---|---|---|
update:open | boolean | Event handler called when the open state of the dialog changes. |
update:fullscreen | boolean | Event handler called when the fullscreen state of the dialog changes. |
click | PointerEvent | Event handler called when the dialog trigger is activated. |
escapeKeyDown | KeyboardEvent | Event handler called when the escape key is down. Can be prevented. |
pointerDownOutside | PointerDownOutsideEvent | Event handler called when a `pointerdown` event happens outside of the `DismissableLayer`. Can be prevented. |
focusOutside | FocusOutsideEvent | Event handler called when the focus moves outside of the `DismissableLayer`. Can be prevented. |
interactOutside | PointerDownOutsideEvent | FocusOutsideEvent | Event handler called when an interaction happens outside the `DismissableLayer`. Specifically, when a `pointerdown`
event happens outside or focus moves outside of it. Can be prevented. |
openAutoFocus | Event | Event handler called when auto-focusing on open. Can be prevented. |
closeAutoFocus | Event | Event handler called when auto-focusing on close. Can be prevented. |
close | MouseEvent | Event handler called when the dialog is requested to be closed. |
fullscreen | MouseEvent | Event handler called when the fullscreen state of the dialog is requested to be toggled. |
confirm | MouseEvent | Event handler called when the dialog is requested to be closed by confirming. |
cancel | MouseEvent | Event handler called when the dialog is requested to be canceled. |
Slots
| Slot Name | Parameters | Description |
|---|---|---|
default | props: DialogCompactBaseSlotProps | Custom content for the default slot. |
trigger | DialogCompactBaseSlotProps | Custom content for the trigger slot. |
title | DialogCompactBaseSlotProps | Custom content for the title slot. |
description | DialogCompactBaseSlotProps | Custom content for the description slot. |
close | DialogCompactBaseSlotProps | Custom content for the close slot. |
fullscreen | DialogCompactBaseSlotProps | Custom content for the fullscreen slot. |
footer | DialogCompactBaseSlotProps | Custom content for the footer slot. |
cancel | DialogCompactBaseSlotProps | Custom content for the cancel slot. |
confirm | DialogCompactBaseSlotProps | Custom content for the confirm slot. |
DialogCancel
Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | ButtonType | 'button' | The type of the button element. Can be one of 'button', 'submit', or 'reset'. |
disabled | boolean | — | Whether the component is disabled. |
asChild | boolean | — | Change the default rendered element for the one passed as a child, merging their props and behavior. |
as | AsTag | Component | 'div' | The element or component this component should render as. Can be overwrite by `asChild` |
Emits
| Emit Name | Parameters | Description |
|---|---|---|
cancel | MouseEvent | Event handler called when the dialog is requested to be canceled. |
DialogClose
Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | ButtonType | 'button' | The type of the button element. Can be one of 'button', 'submit', or 'reset'. |
disabled | boolean | — | Whether the component is disabled. |
asChild | boolean | — | Change the default rendered element for the one passed as a child, merging their props and behavior. |
as | AsTag | Component | 'div' | The element or component this component should render as. Can be overwrite by `asChild` |
Emits
| Emit Name | Parameters | Description |
|---|---|---|
close | MouseEvent | Event handler called when the dialog is requested to be closed. |
DialogCompact
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | The title of the dialog. This is used for accessibility purposes and will be rendered in the header of the dialog if the `title` slot is not provided. |
description | string | — | The description of the dialog. This is used for accessibility purposes and will be rendered in the content of the dialog if the `description` slot is not provided. |
icon | IconValue | — | The icon of the dialog. This is used for accessibility purposes and will be rendered in the header of the dialog if the `icon` slot is not provided. |
showClose | boolean | true | Whether show the close button in the header of the dialog. |
showFullscreen | boolean | true | Whether show the fullscreen toggle button in the header of the dialog. |
pure | boolean | false | Whether to use the pure version of the dialog, which does not include the header and footer.
This is useful when you want to fully control the content of the dialog and do not need the built-in header and footer. |
showCancel | boolean | 'onlyWarning' | 'onlyWarning' | Whether to show the cancel button.
When set to `onlyWarning`, the cancel button will only be shown when the dialog is an alert dialog with `alertType="warning"`.
When set to `true`, the cancel button will always be shown. |
cancelText | string | — | The text of the cancel button. This is used for accessibility purposes and will be rendered in the footer of the dialog if the `cancel` slot is not provided.
Defaults to the localized `dialog.cancel` message from `ConfigProvider`. |
showConfirm | boolean | — | Whether to show the confirm button when the dialog is an alert dialog.
The default value is `true` when the dialog is an alert dialog. |
confirmText | string | — | The text of the confirm button. This is used for accessibility purposes and will be rendered in the footer of the dialog if the `confirm` slot is not provided.
Defaults to the localized `dialog.confirm` message from `ConfigProvider`. |
triggerProps | DialogTriggerProps | — | Properties forwarded to the trigger element. |
overlayProps | DialogOverlayProps | — | Properties forwarded to the overlay element. |
portalProps | PortalProps | — | Properties forwarded to the portal element. |
popupProps | DialogPopupProps | — | Properties forwarded to the popup element. |
headerProps | DialogHeaderProps | — | Properties forwarded to the header element. |
contentProps | DialogContentProps | — | Properties forwarded to the content element. |
footerProps | DialogFooterProps | — | Properties forwarded to the footer element. |
titleProps | DialogTitleProps | — | Properties forwarded to the title element. |
descriptionProps | DialogDescriptionProps | — | Properties forwarded to the description element. |
closeProps | DialogCloseProps | — | Properties forwarded to the close element. |
fullscreenProps | DialogFullscreenProps | — | Properties forwarded to the fullscreen element. |
cancelProps | DialogCancelProps | — | Properties forwarded to the cancel element. |
confirmProps | DialogConfirmProps | — | Properties forwarded to the confirm element. |
modal | ModalityTier | true | The modality of the dialog. When set to `true`, interaction with outside elements will be disabled and only dialog
content will be visible to screen readers.
Set to `'trap-focus'` to trap focus while still letting outside pointer events through (non-modal side panels such
as `Drawer` in the `'trap-focus'` tier). |
dir | Direction | — | The text direction of the dialog |
isAlert | boolean | false | Whether the dialog is an alert dialog. An alert dialog is a dialog that interrupts the user's workflow to communicate an important message and requires a response.
When set to `true`, the dialog will have `role="alertdialog"` and will require a `DialogTitle` to be provided. This is used for accessibility purposes. |
alertType | DialogAlertType | — | The alert type of the dialog, which determines the default icon and styles when the dialog is an alert dialog. |
draggable | boolean | false | Whether the dialog can be moved by dragging its header. |
fullscreen | boolean | undefined | The controlled fullscreen state of the dialog. Can be bound with `v-model:fullscreen`. |
defaultFullscreen | boolean | false | The fullscreen state of the dialog when it is initially rendered. Use when you do not need to control its fullscreen state. |
open | boolean | undefined | The controlled open state of the dialog. Can be bound with `v-model:open`. |
defaultOpen | boolean | false | The open state of the dialog when it is initially rendered. Use when you do not need to control its open state. |
Emits
| Emit Name | Parameters | Description |
|---|---|---|
update:open | boolean | Event handler called when the open state of the dialog changes. |
update:fullscreen | boolean | Event handler called when the fullscreen state of the dialog changes. |
click | PointerEvent | Event handler called when the dialog trigger is activated. |
escapeKeyDown | KeyboardEvent | Event handler called when the escape key is down. Can be prevented. |
pointerDownOutside | PointerDownOutsideEvent | Event handler called when a `pointerdown` event happens outside of the `DismissableLayer`. Can be prevented. |
focusOutside | FocusOutsideEvent | Event handler called when the focus moves outside of the `DismissableLayer`. Can be prevented. |
interactOutside | PointerDownOutsideEvent | FocusOutsideEvent | Event handler called when an interaction happens outside the `DismissableLayer`. Specifically, when a `pointerdown`
event happens outside or focus moves outside of it. Can be prevented. |
openAutoFocus | Event | Event handler called when auto-focusing on open. Can be prevented. |
closeAutoFocus | Event | Event handler called when auto-focusing on close. Can be prevented. |
close | MouseEvent | Event handler called when the dialog is requested to be closed. |
fullscreen | MouseEvent | Event handler called when the fullscreen state of the dialog is requested to be toggled. |
confirm | MouseEvent | Event handler called when the dialog is requested to be closed by confirming. |
cancel | MouseEvent | Event handler called when the dialog is requested to be canceled. |
Slots
| Slot Name | Parameters | Description |
|---|---|---|
default | props: DialogCompactBaseSlotProps | Custom content for the default slot. |
trigger | DialogCompactBaseSlotProps | Custom content for the trigger slot. |
title | DialogCompactBaseSlotProps | Custom content for the title slot. |
description | DialogCompactBaseSlotProps | Custom content for the description slot. |
close | DialogCompactBaseSlotProps | Custom content for the close slot. |
fullscreen | DialogCompactBaseSlotProps | Custom content for the fullscreen slot. |
footer | DialogCompactBaseSlotProps | Custom content for the footer slot. |
cancel | DialogCompactBaseSlotProps | Custom content for the cancel slot. |
confirm | DialogCompactBaseSlotProps | Custom content for the confirm slot. |
DialogCompactBase
DialogConfirm
Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | ButtonType | 'button' | The type of the button element. Can be one of 'button', 'submit', or 'reset'. |
disabled | boolean | — | Whether the component is disabled. |
asChild | boolean | — | Change the default rendered element for the one passed as a child, merging their props and behavior. |
as | AsTag | Component | 'div' | The element or component this component should render as. Can be overwrite by `asChild` |
Emits
| Emit Name | Parameters | Description |
|---|---|---|
confirm | MouseEvent | Event handler called when the dialog is requested to be closed by confirming. |
DialogContent
DialogDescription
DialogFooter
DialogFullscreen
Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | ButtonType | 'button' | The type of the button element. Can be one of 'button', 'submit', or 'reset'. |
disabled | boolean | — | Whether the component is disabled. |
asChild | boolean | — | Change the default rendered element for the one passed as a child, merging their props and behavior. |
as | AsTag | Component | 'div' | The element or component this component should render as. Can be overwrite by `asChild` |
Emits
| Emit Name | Parameters | Description |
|---|---|---|
fullscreen | MouseEvent | Event handler called when the fullscreen state of the dialog is requested to be toggled. |
DialogFullscreenState
Emits
| Emit Name | Parameters | Description |
|---|---|---|
update:fullscreen | boolean | Event handler called when the fullscreen state of the dialog changes. |
DialogHeader
DialogOverlay
Props
| Prop | Type | Default | Description |
|---|---|---|---|
forceMount | boolean | — | Used to force mounting when more control is needed.
Useful when controlling animation with Vue animation libraries. |
DialogPopup
Props
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | — | Change the default rendered element for the one passed as a child, merging their props and behavior. |
as | AsTag | Component | 'div' | The element or component this component should render as. Can be overwrite by `asChild` |
forceMount | boolean | — | Used to force mounting when more control is needed.
Useful when controlling animation with Vue animation libraries. |
Emits
| Emit Name | Parameters | Description |
|---|---|---|
escapeKeyDown | KeyboardEvent | Event handler called when the escape key is down. Can be prevented. |
pointerDownOutside | PointerDownOutsideEvent | Event handler called when a `pointerdown` event happens outside of the `DismissableLayer`. Can be prevented. |
focusOutside | FocusOutsideEvent | Event handler called when the focus moves outside of the `DismissableLayer`. Can be prevented. |
interactOutside | PointerDownOutsideEvent | FocusOutsideEvent | Event handler called when an interaction happens outside the `DismissableLayer`. Specifically, when a `pointerdown`
event happens outside or focus moves outside of it. Can be prevented. |
openAutoFocus | Event | Event handler called when auto-focusing on open. Can be prevented. |
closeAutoFocus | Event | Event handler called when auto-focusing on close. Can be prevented. |
DialogPortal
DialogProvider
DialogRoot
Props
| Prop | Type | Default | Description |
|---|---|---|---|
modal | ModalityTier | true | The modality of the dialog. When set to `true`, interaction with outside elements will be disabled and only dialog
content will be visible to screen readers.
Set to `'trap-focus'` to trap focus while still letting outside pointer events through (non-modal side panels such
as `Drawer` in the `'trap-focus'` tier). |
dir | Direction | — | The text direction of the dialog |
isAlert | boolean | false | Whether the dialog is an alert dialog. An alert dialog is a dialog that interrupts the user's workflow to communicate an important message and requires a response.
When set to `true`, the dialog will have `role="alertdialog"` and will require a `DialogTitle` to be provided. This is used for accessibility purposes. |
alertType | DialogAlertType | — | The alert type of the dialog, which determines the default icon and styles when the dialog is an alert dialog. |
draggable | boolean | false | Whether the dialog can be moved by dragging its header. |
fullscreen | boolean | undefined | The controlled fullscreen state of the dialog. Can be bound with `v-model:fullscreen`. |
defaultFullscreen | boolean | false | The fullscreen state of the dialog when it is initially rendered. Use when you do not need to control its fullscreen state. |
open | boolean | undefined | The controlled open state of the dialog. Can be bound with `v-model:open`. |
defaultOpen | boolean | false | The open state of the dialog when it is initially rendered. Use when you do not need to control its open state. |
Emits
| Emit Name | Parameters | Description |
|---|---|---|
update:open | boolean | Event handler called when the open state of the dialog changes. |
DialogTitle
DialogTrigger
Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | ButtonType | 'button' | The type of the button element. Can be one of 'button', 'submit', or 'reset'. |
disabled | boolean | — | Whether the component is disabled. |
asChild | boolean | — | Change the default rendered element for the one passed as a child, merging their props and behavior. |
as | AsTag | Component | 'div' | The element or component this component should render as. Can be overwrite by `asChild` |
Emits
| Emit Name | Parameters | Description |
|---|---|---|
click | PointerEvent | Event handler called when the dialog trigger is activated. |
Notes
Architecture and benchmark differences
DialogCompact owns the overlay/popup/header/content/footer composition and the imperative dialog(...) state flow while every primitive stays style-free and only the UI wrapper injects the dialogVariants classes. This mirrors radix-ui/shadcn-ui’s headless/styled split. Ant Design, Element Plus, Mantine and Naive UI ship a single styled dialog with mask/closable/keyboard/width props; VeanUI additionally exposes a per-slot *Props channel, a size scale, and an imperative provider API (dialog.*) that the single-package libraries fold into a static service.
| Capability | VeanUI | shadcn/ui | Ant Design Modal | Element Plus Dialog | Mantine Modal | Naive UI Dialog |
|---|---|---|---|---|---|---|
| Aria/styled split | ✅ | ✅ | — | — | — | — |
| Imperative API | ✅ | — | ✅ | ✅ | ✅ | ✅ |
| Modal (aria-modal + trap) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Alert mode (alertdialog) | ✅ | ✅ | ✅ | — | — | ✅ |
| Focus return on close | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Sizes (6) | ✅ | — | — | — | — | — |
| Localized cancel/confirm text | ✅ | — | — | — | — | — |
| Pure (no header/footer) | ✅ | — | — | — | — | — |
— = unsupported or a different interaction model.
Cautions
DialogCompactdefaults tomodal(true); the portal teleports the popup todocument.bodyand the body scroll is managed by the hide-others layer.showConfirmdefaults totruewhen the dialog is an alert;showCanceldefaults to'onlyWarning'(cancel appears only foralertType="warning"). Pass an explicit boolean to override.cancelText/confirmTextdefault to the localizeddialog.cancel/dialog.confirmmessages; override per instance.isAlertrequires aDialogTitlefor accessibility (role="alertdialog"must be labelled). Settitleor thetitleslot.pureremoves the header and footer, sotitle/descriptionare no longer rendered — provide your own accessible label in that mode.- The imperative
dialog(...)API needsSDialogProvidermounted; calling it without the provider is a no-op.
FAQ
How do I control the open state?
Bind open with v-model, or pass defaultOpen for an uncontrolled dialog:
<SDialog v-model:open="open" title="Preferences">...</SDialog>How do I show an alert-style dialog?
Set is-alert with an alert-type. The popup gets role="alertdialog" and the matching type icon:
<SDialog is-alert alert-type="warning" title="Delete" description="This cannot be undone.">
<template #trigger><SButton>Delete</SButton></template>
</SDialog>How do I use the imperative API?
Mount SDialogProvider once, then call dialog.* from anywhere (see the Overview section for a full example):
import { dialog } from '@vean/ui';
dialog.warning('Disk full', { description: 'Free up space.' });How do I build a fully custom dialog?
Use pure and fill the default slot:
<SDialog v-model:open="open" pure>
<div class="custom">...</div>
</SDialog>How do I make a non-modal dialog?
Set modal={false} to allow interacting with content outside the dialog:
<SDialog v-model:open="open" :modal="false" title="Palette">...</SDialog>How do I make a draggable dialog?
Set draggable and drag the header to move the dialog. The position is kept until the dialog is closed:
<SDialog draggable title="Panel">
<template #trigger><SButton>Open</SButton></template>
<div>Drag the header to move this dialog.</div>
</SDialog>How do I use the fullscreen mode?
Toggle it with the header button (showFullscreen, hidden by default — pass show-fullscreen to opt in) or drive it with v-model:fullscreen:
<SDialog v-model:fullscreen="fullscreen" title="Panel">...</SDialog>