feat: sheet/card modal emit drag
See original GitHub issuePrequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
If a FR like this already exist, please close, but i didn’t found one.
It would be great to be able to “dig” into Animations and Gestures that are used in the Ionic Framework.
Describe the Use Case
It would allow us to show, hide or transform & animate stuff in the app while the user performs something. For example with the new sheet style modal we could fade content in or out if the modal is dragged up or dragged down.
Also this can be used for navigation animations.
Describe Preferred Solution
I guess this is kinda tricky, as this can be either defined globally or per component.
For example if i want to implement this for a Modal it must be possible for me to add this in the Component that the Modal uses like
this.modal.animation.subscribe()
Describe Alternatives
Currently i think something like this is possible if we copy/paste all the animations/gestures from ionic into our app and modify to call a handler, but this is not very good, as it doesn’t update the animations if you update it internally 🤔
Related Code
No response
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:13
- Comments:10 (9 by maintainers)
Top GitHub Comments
Thanks – makes sense to have this work for card modal too.
Added additional thoughts here: https://github.com/ionic-team/ionic-framework/issues/25127#issuecomment-1104375899
Summary: We should add a
dragEvents
property toion-modal
, to allow developers to subscribe to the drag events for both card and sheet modals. Sheet modals should likely include information related to the breakpoint as well.