Quick tip! I wanted to make some modals in a Vue app—here are the resources I found that helped or could help in future.
This was uses the Vue
transition element, which I can’t say I remember learning about before—it looks pretty useful!
Update after using
vue-js-modal props for sizing and responsiveness were a bit finicky so I opted to adapt the Vue docs example for a modal that contained more content and needed to take up more of the screen.
The only thing that needed a bit of extra help was closing the modal…I added a click event to the
modal-mask element, and also temporarily added a window event listener so that the modal would close when someone hits the Esc key. The final methods for the modal looked like this: