Common UI kit components
Confluence UI kit components
Jira UI kit components

Rate this page:

Macro

An area of dynamic content in a Confluence page or blog.

Example of a macro

Usage notes

Import statement

1
import ForgeUI, { Macro } from '@forge/ui';

Props

NameTypeRequiredDescription
appForgeExtensionYesThe app code for the macro.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import ForgeUI, { render, Macro, Text } from "@forge/ui";

const App = () => {
  const data = {
    name: "Fluffy",
    age: 2
  }

  return <Text>{data.name} is {data.age} years old.</Text>;;
};

export const run = render(
  <Macro
    app={<App />}
  />
);

Rate this page: