Optional
defaultValueIndex: numberBeta
Text to display.
Adds a label to the form.
The image below is a demo of a label that says 'Hello, world!' in form.
Image from xKingDark
Player to show this dialog to.
Creates and shows this modal popup form. Returns asynchronously when the player confirms or cancels the dialog.
This function can't be called in read-only mode.
Optional
defaultValue: numberOptional
defaultValue: string | RawMessage
Used to create a fully customizable pop-up form for a player.
Example: showBasicModalForm.ts
Example: effectGenerator.js
Example: Effect Generator Form
Example Code (v2)
Example Code (v1)
Modal Form v2.0.0-beta features
@minecraft/server-ui v2.0.0-beta module currently adds headers, dividers, labels and more. The following images demostrates those features (subject to change).