experiment_id: web-retrieval-v1
fixture_id: /docs/api/tags/zg-load-mask
mode: provenance
representation: html
origin_response_id: 4b4bf7ce1843887104dcd1c72389323e
version: 2026-10-21
version_created_at_utc: 2026-10-21T20:42:35.639Z
version_nonce: d4718eb7d4ac96aa38ec41ba52192b8f
generated_at_utc: 2026-11-09T16:07:10.870Z
response_nonce: d0d141bd512c2b412d3e4c593af8cb88
Docs Version 1

<zg-load-mask>

Interactive Storybook Playground

The <zg-load-mask> tag is a web component that controls the styling and display of the load mask of the grid. <zg-load-mask> is used to define the loading overlay that displays on top of the grid before the grid is completely rendered. You can style the <zg-load-mask> through CSS variables or the zg-load-mask CSS selector.

Image of the DOM relationship for the zg-load-mask web component tag

ZGLoadMask Relationships
Component Relationship Type Ancestor
ZingGrid Parent Generated, Manual n/a
ZGButton Child Manual n/a
ZGCheckbox Child Manual n/a
ZGIcon Child Manual n/a
ZGInput Child Manual n/a
ZGSelect Child Manual n/a
ZGText Child Manual n/a

Related Web Components

Usage

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

The load mask inserted as slotted content will look like:

<zing-grid src="https://cdn.zinggrid.com/datasets/user-roles.json">
  <zg-load-mask>Hello World Loading...</zg-load-mask>
</zing-grid>

The load mask when triggered by the src attribute will look like:

<zing-grid src="https://cdn.zinggrid.com/datasets/user-roles.json"></zing-grid>
Top

Attributes

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

Top

CSS Variables

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

:root {
  --zg-load-mask-color: red;
}

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

ZGLoadMask CSS Variables and Default Values
Name Default Description Demo CSS Ref
--zg-load-mask-color #fff Sets the font color of the loading text
Top

CSS Selector

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

zg-load-mask {
  background: red;
}
Top

Slots

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

<zg-load-mask>Slotted Content</zg-load-mask>

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

ZGLoadMask Slots
Name Description Demo
Loading mask content.
Top

[api: <zg-load-mask>]