Skip to content
BasaltSoftware
Bedrock 1.26.60

Site colour

Discord
Esc

    ↑↓ moveEnter openEsc close

    Keyboard shortcuts
    Ctrl K
    Search the whole site, from any page
    /
    Jump to the sidebar search, or search the whole site where there isn't one
    Enter
    Open the top search result
    Esc
    Clear the search, or close this panel
    ?
    Show these shortcuts

    Basalt's own: the 1.26 client's data-driven minecraft:custom_form screen, as PowerNukkitX builds it.

    Class in @minecraft/server-ui

    Basalt’s own: the 1.26 client’s data-driven minecraft:custom_form screen, as PowerNukkitX builds it. Buttons run their callback each time they’re pressed, while the screen stays open.

    import { CustomForm } from '@minecraft/server-ui';
    constructor(title?: Text);
    Parameters
    titleoptional
    Text
    closeButton(label?: Text): CustomForm;

    The X in the corner.

    Parameters
    labeloptional
    Text
    Returns
    CustomForm
    button(label: Text, onClick: () => void, options?: CustomFormButtonOptions): CustomForm;
    Parameters
    label
    Text
    onClick
    () => void
    optionsoptional
    CustomFormButtonOptions
    Returns
    CustomForm
    textField(label: Text, defaultValue?: string, options?: CustomFormFieldOptions): CustomForm;
    Parameters
    label
    Text
    defaultValueoptional
    string
    optionsoptional
    CustomFormFieldOptions
    Returns
    CustomForm
    toggle(label: Text, defaultValue?: boolean, options?: CustomFormFieldOptions): CustomForm;
    Parameters
    label
    Text
    defaultValueoptional
    boolean
    optionsoptional
    CustomFormFieldOptions
    Returns
    CustomForm
    slider(label: Text, min: number, max: number, defaultValue?: number, options?: CustomFormSliderOptions): CustomForm;

    Whole numbers only.

    Parameters
    label
    Text
    min
    number
    max
    number
    defaultValueoptional
    number
    optionsoptional
    CustomFormSliderOptions
    Returns
    CustomForm
    dropdown(label: Text, items: Text[], defaultIndex?: number, options?: CustomFormFieldOptions): CustomForm;
    Parameters
    label
    Text
    items
    Text[]
    defaultIndexoptional
    number
    optionsoptional
    CustomFormFieldOptions
    Returns
    CustomForm
    label(text: Text): CustomForm;
    Parameters
    text
    Text
    Returns
    CustomForm
    header(text: Text): CustomForm;
    Parameters
    text
    Text
    Returns
    CustomForm
    spacer(): CustomForm;
    Returns
    CustomForm
    show(player: Player): Promise<ScreenResponse>;

    Resolves when the screen closes.

    Parameters
    player
    Player
    Returns
    Promise<ScreenResponse>