@minecraft/server-ui
    Preparing search index...

    Interface ButtonDataBeta

    Data used to configure a button.

    interface ButtonData {
        label: string | ObservableString | ObservableUIRawMessage | UIRawMessage;
        onClick: () => void;
        options?: ButtonOptions;
    }
    Index

    Properties

    The text label to display on the button.

    onClick: () => void

    A callback function that is invoked when the player clicks the button.

    options?: ButtonOptions

    Optional configuration for the button, such as a tooltip, disabled state, image, or visibility.