Skip to main content

showHUD

Display HUD.

Only one HUD can be displayed at a time, meaning the latest one will overwrite the others. To close the HUD display (e.g., when using the progress type to indicate loading and needing to close it after loading is complete), please use hideHUD().

Parameters

type HUDType = "success" | "error" | "progress" | "banner";

interface ShowHUDRequest {
type: HUDType;
title?: string;
message?: string;
delay?: number;
interaction?: boolean;
}
NameTypeRequiredDefaultDescription
typeHUDTypeYesHUD type (success, error, progress, banner)
titlestringNoTitle
messagestringNoMessage
delaynumberNoDisplay duration in milliseconds
interactionbooleanNOtrueWhether the user can interact with the interface while the HUD is displayed (content covered by the HUD)

Example

import { showHUD } from "minip-bridge";

showHUD({
type: "success",
title: "Success",
message: "Do something successfully.",
delay: 500,
interaction: false,
});