For closing modal, currently we have two options –

  1. Click on Overlay
  2. Click on close button

Now, if user doesn’t want to close the modal by clicking on either of these two options, I have introduced a new class.


When a user wants to close the modal from an internal link in the modal content or from a custom button, just apply this class name to that element. When a user clicks on that element where this class is applied, the current open modal will be closed.

Example –

This will close the modal