Include a font icon in a single widget

Include a font icon in a single widget if you only want that one widget to have access to the font icon.

Adding an icon to a specific widget keeps the icon scoped to just that widget so it won’t interfere with other CSS on the page. You also won't be able to use that font-icon set outside of that widget.

  1. In the platform UI, navigate to Service Portal > Widgets and click the widget you want to add an icon to.
  2. Attach the icon file to the widget record.
  3. In the CSS field for the widget, add the CSS for the font-icon definition. Use the sys_id of the attachment as the src in the CSS.

    Widget with icon set attached and sample CSS

Result

The example displays an icon that looks like the following, which you can select in the widget or widget instance. Example icon that matches the HTML in the widget example, with a check circle that says "you did it!"

To use custom font-icons across widgets, add the icon to a page or make it a widget dependency.