How can i use modal window in the theia widget?

Such as the window to new a file in the EXPLORER. Are there any API to use? An example would be perfect. Thank you.

[original thread by AlwaysMing]

Modals are actually called Dialogs in the framework, one example is the SingleTextInputDialog and can be triggered like so: