<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>]