experiment_id: web-retrieval-v1
fixture_id: /docs/v1/api/tags/zg-selector-mask
mode: provenance
representation: html
origin_response_id: 86e0b30a0f1d529b636c1966ea76a593
version: 2026-10-21
version_created_at_utc: 2026-10-21T20:42:35.779Z
version_nonce: 97239a1cb8a84105da9e0d36daf85e6a
generated_at_utc: 2026-11-23T02:07:27.249Z
response_nonce: 7299100f74253fd4b50660d233c6a3af
Docs Version 1

<zg-selector-mask>

Version 1

Interactive Storybook Playground

The <zg-selector-mask> tag is a web component that is used to wrap the cells during user selection for styling purposes. The element should not be manually inserted by the user. The selector mask is styleable via CSS variables or the zg-selector-mask CSS selector.

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

ZGSelectorMask Relationships
Component Relationship Type Ancestor
ZingGrid Parent Generated n/a

Related Web Components

Usage

A <zg-selector-mask> tag can be triggered by adding the selector attribute on the <zing-grid> tag, like so:

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

Attributes

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

Top

CSS Variables

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

:root {
  --zg-selector-mask-background: red;
}

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

ZGSelectorMask CSS Variables and Default Values
Name Default Description Demo CSS Ref
--zg-selector-mask-background var(--theme-color-secondary) Styles the background of selector mask
--zg-selector-mask-opacity .1 Sets the opacity of selector mask
Top

CSS Selector

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

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

CSS Shadow Parts

<zg-selector-mask> exposed elements within the shadow can be styled by CSS shadow parts, like so:

zg-selector-mask::part(selector-mask) {
  background-color: red;
}

Below is a list of all the associated ZGSelectorMask shadow parts. Check out the full list of CSS shadow parts or our Styling Basics guide to learn more about styling the grid.

ZGSelectorMask CSS Shadow Parts
Name Description
selector-mask The container for the selector mask
Top

Slots

There are no slots available for the <zg-selector-mask> web component.

Top

[api: <zg-selector-mask>]