This function can't be called in early-execution mode.
The label to display for the dropdown.
The selectable items for the dropdown.
Optional
dropdownOptions: ModalFormDataDropdownOptionsThe optional additional values for the dropdown creation.
This function can't be called in early-execution mode.
Text to display.
This function can't be called in early-execution mode.
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
This function can't be called in early-execution mode.
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.
This function can't be called in early-execution mode.
The label to display for the slider.
The minimum selectable possible value.
The maximum selectable possible value.
Optional
sliderOptions: ModalFormDataSliderOptionsThe optional additional values for the slider creation.
This function can't be called in early-execution mode.
The label to display for the textfield.
The place holder text to display.
Optional
textFieldOptions: ModalFormDataTextFieldOptionsThe optional additional values for the textfield creation.
This function can't be called in early-execution mode.
This function can't be called in early-execution mode.
The label to display for the toggle.
Optional
toggleOptions: ModalFormDataToggleOptionsThe optional additional values for the toggle creation.
This function can't be called in early-execution mode.
Used to create a fully customizable pop-up form for a player.
Example: showBasicModalForm.ts
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).