diff options
| author | XhmikosR <[email protected]> | 2021-07-29 09:14:40 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-07-29 09:14:40 +0300 |
| commit | ef5336373fc2431b3d1d37cde85cd262210a1dc6 (patch) | |
| tree | e325fb4c5532b464d05780c731d0f118f2a88d7f /site/content/docs/5.0/components/modal.md | |
| parent | 62edf07d7491684fe67a9c1e9439ed2bd10ca741 (diff) | |
| parent | c6c0bbb0b67fe89b55740a63fd10d4ad79044970 (diff) | |
| download | bootstrap-main-fod-simpler-table-structure.tar.xz bootstrap-main-fod-simpler-table-structure.zip | |
Merge branch 'main' into main-fod-simpler-table-structuremain-fod-simpler-table-structure
Diffstat (limited to 'site/content/docs/5.0/components/modal.md')
| -rw-r--r-- | site/content/docs/5.0/components/modal.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/site/content/docs/5.0/components/modal.md b/site/content/docs/5.0/components/modal.md index e6a838aac..56fad0297 100644 --- a/site/content/docs/5.0/components/modal.md +++ b/site/content/docs/5.0/components/modal.md @@ -831,11 +831,20 @@ The modal plugin toggles your hidden content on demand, via data attributes or J ### Via data attributes +#### Toggle + Activate a modal without writing JavaScript. Set `data-bs-toggle="modal"` on a controller element, like a button, along with a `data-bs-target="#foo"` or `href="#foo"` to target a specific modal to toggle. ```html <button type="button" data-bs-toggle="modal" data-bs-target="#myModal">Launch modal</button> ``` +#### Dismiss + +{{% js-dismiss "modal" %}} + +{{< callout warning >}} +While both ways to dismiss a modal are supported, keep in mind that dismissing from outside a modal does not match [the WAI-ARIA modal dialog design pattern](https://www.w3.org/TR/wai-aria-practices-1.1/#dialog_modal). Do this at your own risk. +{{< /callout >}} ### Via JavaScript |
