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

    Interface ImageOptionsBeta

    Options for configuring an image component.

    interface ImageOptions {
        onClick?: () => void;
        tooltip?: string | ObservableString | ObservableUIRawMessage | UIRawMessage;
        visible?: boolean | ObservableBoolean;
        width?: number | ObservableNumber;
    }
    Index

    Properties

    onClick?: () => void

    Sets a callback to be executed when the image is clicked.

    Sets a tooltip to be displayed when the user hovers over the image.

    visible?: boolean | ObservableBoolean

    When false or bound to a false ObservableBoolean, the image is hidden.

    width?: number | ObservableNumber

    Sets the width of the image as a percentage of the width of the form. 1 is the entire form width, 0.5 is half of the form width. Greater than 1 or less than/equal to 0 will become 1.