Skip to content

Commit ad80e51

Browse files
committed
docs(Dialog): document closeOnClickOutside and blocking props
1 parent a32503b commit ad80e51

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

  • apps/docs/src/pages/components/disclosure

apps/docs/src/pages/components/disclosure/dialog.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,32 @@ A modal dialog with title, description, and cancel/confirm buttons using the nat
4343

4444
:::
4545

46+
## Features
47+
48+
### Click-Outside Dismissal
49+
50+
By default, clicking the backdrop closes the dialog. Set `closeOnClickOutside` to `false` on `Dialog.Content` to prevent this:
51+
52+
```vue
53+
<template>
54+
<Dialog.Content :close-on-click-outside="false">
55+
<!-- Dialog won't close on backdrop click -->
56+
</Dialog.Content>
57+
</template>
58+
```
59+
60+
### Blocking Dialogs
61+
62+
The `blocking` prop disables scrim-based dismissal entirely — the dialog can only be closed programmatically. Use this for critical confirmations where the user must make an explicit choice:
63+
64+
```vue
65+
<template>
66+
<Dialog.Content blocking>
67+
<!-- No scrim, no click-outside close — must use Dialog.Close or v-model -->
68+
</Dialog.Content>
69+
</template>
70+
```
71+
4672
## Anatomy
4773

4874
```vue Anatomy playground

0 commit comments

Comments
 (0)