• Getting Started

  • Data

  • Chart Types

  • Chart Elements

  • Integrations

  • API

  • Tools

  • FAQ

  • Change Log

  • <zg-filter>

    Interactive Storybook Playground

    The <zg-filter> tag is the container for a single cell when the cell contains a filter. It is used as a CSS target for styling by the developer. The <zg-filter> web component should not be accessed specifically beyond styling.

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

    Related Web Components

    Usage

    The <zg-filter> element is a generated element added to <zing-grid> when the filter="inline" attribute is defined.

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

    Attributes

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

    CSS Variables

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

    :root {
    --zg-filter-background: red;
    }
    

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

    CSS Selector

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

    zg-filter {
      background: red;
    }
    

    CSS Shadow Parts

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

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

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

    Slots

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