Rate this page:
The ContextMenu
component renders content in an inline dialog when triggered from the context menu.
The context menu shows when a user selects some text. ContextMenu
is the top-level component required for the confluence:contextMenu
module.
This module can only be used in Confluence.
1
import ForgeUI, { ContextMenu } from '@forge/ui';
Name | Type | Required | Description |
---|---|---|---|
children | Array<ForgeComponent> | Yes | A container for displaying multiple components. Can only contain InlineDialog. |
A hello world example of the ContextMenu
component.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import ForgeUI, { render, Text, ContextMenu, InlineDialog } from '@forge/ui';
const App = () => {
return (
<InlineDialog>
<Text>Hello world!</Text>
</InlineDialog>
);
};
export const run = render(
<ContextMenu>
<App/>
</ContextMenu>
);
Rate this page: