The dialog can be closed via the “X” button or by clicking the modal backdrop.
```ts
+import { dialogFactory } from "WoltLabSuite/Core/Component/Dialog";
+
const dialog = dialogFactory().fromHtml("<p>Hello World</p>").withoutControls();
dialog.show("Greetings from my dialog");
```
The dialog itself will be limited to a width of 500px, the title can wrap into multiple lines and there will be no “X” button to close the dialog.
```ts
+import { dialogFactory } from "WoltLabSuite/Core/Component/Dialog";
+
const dialog = dialogFactory()
.fromHtml("<p>ERROR: Something went wrong!</p>")
.asAlert();
```
```ts
+import { dialogFactory } from "WoltLabSuite/Core/Component/Dialog";
+
document.getElementById("showMyDialog")!.addEventListener("click", () => {
const dialog = dialogFactory().fromId("myDialog").asPrompt();