The <zg-nodata> tag is a web component that controls the styling and display of the message that appears to let the user know when no data has been loaded into a grid.

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

Related Web Components


A <zg-nodata> tag can be manually inserted inside the grid as slotted content or automatically inserted when enabled via the nodata attribute. The message is styleable via CSS variables or the zg-nodata CSS selector.

You can insert <zg-nodata> via the nodata attribute, like so:

<zing-grid nodata="Hello No Data"></zing-grid>

You can slot the <zg-nodata> tag as well:

  <zg-nodata>Hello No Data!</zg-nodata>


There are no attributes available for the <zg-nodata> web component.

CSS Variables

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

:root {
  --zg-nodata-background: red;

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

ZGNodata CSS Variables and Default Values
NameDefaultDescriptionDemoCSS Ref

CSS Selector

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

zg-nodata {
  background: red;

[api: <zg-nodata>]