You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/src/content/docs/components/dialog.mdx
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,11 @@ The Dialog component leverages the browser's native `<dialog>` element, providin
15
15
16
16
Key features of the native dialog:
17
17
18
-
-**Native modal behavior** via `showModal()` with automatic focus trapping
19
-
-**Built-in backdrop** using the `::backdrop` pseudo-element
20
-
-**Escape key handling** closes the dialog by default
21
-
-**Accessibility** with proper focus management and ARIA attributes
22
-
-**Top layer rendering** ensures the dialog appears above all other content
23
-
24
-
Native `<dialog>` elements support two methods: `show()` opens the dialog inline without a backdrop or focus trapping, while `showModal()` opens it as a true modal in the browser's top layer with a backdrop, focus trapping, and Escape key handling. Bootstrap's Dialog component uses `showModal()` to provide the expected modal experience.
18
+
-**Modal or inline** via `showModal()` / `show()` — `modal: true` (default) promotes the dialog to the browser's top layer with a backdrop and focus trapping; `modal: false` renders it inline.
19
+
-**Built-in backdrop** using the `::backdrop` pseudo-element (modal only); set `backdrop: "static"` to lock clicks outside, or `backdrop: false` to hide it.
20
+
-**Escape key handling** closes the dialog by default; set `keyboard: false` to disable.
21
+
-**Accessibility** — focus is trapped inside modal dialogs and returned to the trigger on close, with native `<dialog>` ARIA semantics.
22
+
-**Animated open and close** — circumvent browser restrictions by using a `.hiding` class to keep dialogs in the top layer during close so the exit transition (including `::backdrop`) are animated properly.
0 commit comments