<!-- Do not edit this file. It is automatically generated by API Documenter. --> [`setIcon`](setIcon) ## setIcon() function Insert an SVG into the element from an iconId. Does nothing if no icon associated with the iconId. **Signature:** ```typescript export function setIcon(parent: HTMLElement, iconId: IconName): void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | <code>parent</code> | <code>HTMLElement</code> | the HTML element to insert the icon | | <code>iconId</code> | [`IconName`](IconName) | the icon ID | **Returns:** `void`