ContextMenu Class
Deprecated in 4.16.0. Use [[iTwinUI DropdownMenu]] component instead.
A context menu populated with ContextMenuItem components. Can be nested using ContextSubMenu component.
Extends
- React.PureComponent<ContextMenuProps, ContextMenuState>
Methods
| Name | Description | |
|---|---|---|
| constructor(props: ContextMenuProps): ContextMenu | ||
| blur(): void | ||
| componentDidMount(): void | Called immediately after a component is mounted. | |
| componentWillUnmount(): void | Called immediately before a component is destroyed. | |
| focus(): void | ||
| getRect(): DOMRect | ||
| render(): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> |
Properties
| Name | Type | Description | |
|---|---|---|---|
| defaultProps Static | Partial<ContextMenuProps> | ||
| state Readonly | Readonly<ContextMenuState> |
Defined in
Last Updated: 28 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.