This sample shows how to achieve the following modal dialog UI using HTML:
It will also help you learn about handling OK/Cancel buttons, as well as Escape and Return key presses.
- In XD, open the Developer Console at Plugins > Development > Developer Console
- Run this plugin at Plugins > (UI) HTML Plugin
- Enter your name in the modal
- Click the OK or Cancel button, or press your keyboard's return or escape key
- See the output in the Developer Console
Learn more about creating modal dialog UI in our docs: