diff --git a/core/src/components/modal/readme.md b/core/src/components/modal/readme.md index d74c7a7d8e..e361e80af7 100644 --- a/core/src/components/modal/readme.md +++ b/core/src/components/modal/readme.md @@ -489,6 +489,7 @@ In most scenarios, setting a ref on `IonRouterOutlet` and passing that ref's `cu isOpen={show2ndModal} cssClass='my-custom-class' presentingElement={firstModalRef.current} + swipeToClose={true} onDidDismiss={() => setShow2ndModal(false)}>

This is more modal content

setShow2ndModal(false)}>Close Modal @@ -751,6 +752,47 @@ export default defineComponent({ > If you need a wrapper element inside of your modal component, we recommend using an `` so that the component dimensions are still computed properly. +### Swipeable Modals + +Modals in iOS mode have the ability to be presented in a card-style and swiped to close. The card-style presentation and swipe to close gesture are not mutually exclusive, meaning you can pick and choose which features you want to use. For example, you can have a card-style modal that cannot be swiped or a full sized modal that can be swiped. + +> Card style modals when running on iPhone-sized devices do not have backdrops. As a result, the `--backdrop-opacity` variable will not have any effect. + +```html + + + +``` + ## Properties diff --git a/core/src/components/modal/usage/react.md b/core/src/components/modal/usage/react.md index 1aecc080c8..702e17f681 100644 --- a/core/src/components/modal/usage/react.md +++ b/core/src/components/modal/usage/react.md @@ -147,6 +147,7 @@ In most scenarios, setting a ref on `IonRouterOutlet` and passing that ref's `cu isOpen={show2ndModal} cssClass='my-custom-class' presentingElement={firstModalRef.current} + swipeToClose={true} onDidDismiss={() => setShow2ndModal(false)}>

This is more modal content

setShow2ndModal(false)}>Close Modal diff --git a/core/src/components/modal/usage/vue.md b/core/src/components/modal/usage/vue.md index 47afb4083d..86d06cc394 100644 --- a/core/src/components/modal/usage/vue.md +++ b/core/src/components/modal/usage/vue.md @@ -93,3 +93,44 @@ export default defineComponent({ ``` > If you need a wrapper element inside of your modal component, we recommend using an `` so that the component dimensions are still computed properly. + +### Swipeable Modals + +Modals in iOS mode have the ability to be presented in a card-style and swiped to close. The card-style presentation and swipe to close gesture are not mutually exclusive, meaning you can pick and choose which features you want to use. For example, you can have a card-style modal that cannot be swiped or a full sized modal that can be swiped. + +> Card style modals when running on iPhone-sized devices do not have backdrops. As a result, the `--backdrop-opacity` variable will not have any effect. + +```html + + + +``` \ No newline at end of file