ToolUtilities.defineIcon Function
Defines an icon property for a specified ($@itwin/core-frontend#ToolType$refLinkSource=imodel-components-react/ui/imodel-components-react/src/imodel-components-react/ToolUtilities.ts@35).
ToolUtilities.defineIcon(MyTool, <SvgPlaceholder />);
Alternatively, consumers can define the iconElement property directly on the tool class.
class MyTool extends Tool {
  public static iconElement = <SvgPlaceholder />;
}
defineIcon<T extends >(toolType: T, iconElement: React.ReactElement<any, string | React.JSXElementConstructor<any>>): ToolWithIcon<T>
| Parameter | Type | Description | 
|---|---|---|
| toolType | T | |
| iconElement | React.ReactElement<any, string | React.JSXElementConstructor<any>> | 
Returns - ToolWithIcon<T>
Defined in
Last Updated: 24 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.