<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.
Component | Relationship | Type | Ancestor |
---|
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>
Attributes
There are no attributes available for the <zg-selector-mask>
web component.
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.
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 |
CSS Selector
<zg-selector-mask>
can be styled by common CSS selectors, like so:
zg-selector-mask { background: red; }
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.
Name | Description |
---|---|
selector-mask | The container for the selector mask |
Slots
There are no slots available for the <zg-selector-mask>
web component.
[api: <zg-selector-mask>]