The showFlag bridge method enables UI Kit and Custom UI apps to open flags in the Atlassian app's flag group.
1 2function showFlag(flagOptions: FlagOptions): { close: () => Promise<boolean | void>; }; interface FlagOptions { id: string; title?: string; description?: string; type?: "info" | "success" | "warning" | "error"; appearance?: "info" | "success" | "warning" | "error"; actions?: FlagAction[]; isAutoDismiss?: boolean; } interface FlagAction { text: string; onClick: () => void; }
true, the flag will automatically close after 8 seconds.close function.Normal flags:
Bold appearance flags:
Normal info flag:
1 2import { showFlag } from "@forge/bridge"; showFlag({ id: "info-normal", title: "Information", type: "info", description: "This is an informational message.", isAutoDismiss: true, });
Bold info flag:
1 2import { showFlag } from "@forge/bridge"; showFlag({ id: "info-bold", title: "No team members found", type: "info", appearance: "info", // Bold appearance, no dismiss button with a close icon description: "Add teammates to get started.", actions: [ { text: "Add teammates", onClick: () => console.log("Navigate to team page"), }, { text: "Skip", onClick: () => console.log("User skipped"), }, ], });
See Jira Project Stats App for showFlag used in an app.
Rate this page: