The <zg-icon> tag is a web component that controls the styling and display of icons in the grid.

Image of the DOM relationship for the zg-icon web component tag

Related Web Components


A <zg-icon> tag can be manually inserted inside the grid as slotted content.

	<zg-icon name="checkmark"></zg-icon>
	<zg-icon name="submitrecord"></zg-icon>


Use the name attribute to determine the icon's type.

Example Usage

  <zg-icon renderer="fncCallAfterTemplateTagInserted">
    <!-- Optional template tag -->




Sets the icon type of <zg-icon>

Default Value


Accepted Values

  • "cancelrecord"
  • "checked"
  • "checkmark"
  • "close"
  • "down"
  • "edit"
  • "editrecord"
  • "duplicaterecord"
  • "firstpage"
  • "lastpage"
  • "layoutcard"
  • "layoutrow"
  • "link"
  • "menu"
  • "nextpage"
  • "outsidearrow"
  • "prevpage"
  • "reload"
  • "remove"
  • "removerecord"
  • "search"
  • "sort"
  • "submitrecord"
  • "unchecked"
  • "up"

CSS Variables

<zg-icon> can be styled with CSS variables, like so:

:root {
  --zg-icon-color: red;

Below is a list of all the associated --zg-icon CSS variables. Check out the full list of CSS variables or our Styling Basics guide to learn more about styling the grid.

ZGIcon CSS Variables and Default Values
NameDefaultDescriptionDemoCSS Ref
--zg-icon-colorvar(--theme-color-primary)Sets the fill color of icon
--zg-icon-heightBrowser's default valueSets the height of icon. Also set width using --zg-icon-width to scale icon.
--zg-icon-init-fillBrowser's default valueSets fill color of icon when element has [init] attribute. This indicates that column is sortable. The [init] is removed when column is sorted.
--zg-icon-widthBrowser's default valueSets the width of icon. Also set height using --zg-icon-height to scale icon.

CSS Selector

<zg-icon> can be styled by common CSS selectors, like so:

zg-icon {
  stroke: red;


<zg-icon> contains placeholders to allow adding markup inside the component.

<zg-icon><img slot="icon" src="..."></zg-icon>

Below is a list of all the associated ZGIcon slots. Check out the full list of slots.

ZGIcon Slots
iconIcon content.

[api: <zg-icon>]