experiment_id: web-retrieval-v1
fixture_id: /docs/api/tags/zg-option-list
mode: provenance
representation: html
origin_response_id: b378b2466284758b4a0a1d5ef53a4b96
version: 2026-10-21
version_created_at_utc: 2026-10-21T20:42:35.643Z
version_nonce: 4fe323b4837c8928cef206a518689e62
generated_at_utc: 2026-11-08T23:26:24.164Z
response_nonce: b9c9f5a02df9f5ebe02cbb0576b2f099
Docs Version 1

<zg-option-list>

Interactive Storybook Playground

The <zg-option-list> tag is a web component that goes within <zg-select> as the option list and used as a CSS target for styling by the developer. The <zg-option-list> web component should not be accessed specifically beyond styling.

Image of the DOM relationship for the zg-option-list web component tag

ZGOptionList Relationships
Component Relationship Type Ancestor
ZGSelect Parent Generated n/a

Related Web Components

Usage

The <zg-option-list> element is a generated element added to <zg-select> when the pager attribute is defined.

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

Attributes

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

Top

CSS Variables

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

:root {
  --zg-option-list-background: red;
}

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

ZGOptionList CSS Variables and Default Values
Name Default Description Demo CSS Ref
--zg-option-list-background #fff Styles the background of option list
--zg-option-list-border 1px solid var(--theme-border-color) Styles the border of option list
--zg-option-list-border-bottom var(--zg-option-list-border, 1px solid var(--theme-border-color)) Styles the bottom border of option list
--zg-option-list-border-left var(--zg-option-list-border, 1px solid var(--theme-border-color)) Styles the left border of option list
--zg-option-list-border-right var(--zg-option-list-border, 1px solid var(--theme-border-color)) Styles the right border of option list
--zg-option-list-border-top var(--zg-option-list-border, 1px solid var(--theme-border-color)) Styles the bottom top of option list
--zg-option-list-color Browser's default value Styles the color of option list item
--zg-option-list-item-background_focus var(--theme-color-secondary) Sets the background of option list item on focus
--zg-option-list-item-background_hover var(--theme-color-secondary) Sets the background of option list item on hover
--zg-option-list-item-border 0 Styles the border of option list item
--zg-option-list-item-border-bottom var(--zg-option-list-item-border, 0) Styles the bottom border of option list item
--zg-option-list-item-border-left var(--zg-option-list-item-border, 0) Styles the left border of option list item
--zg-option-list-item-border-right var(--zg-option-list-item-border, 0) Styles the right border of option list item
--zg-option-list-item-border-top var(--zg-option-list-item-border, 0) Styles the top border of option list item
--zg-option-list-item-height 32px Sets the height of option list item
--zg-option-list-item-line-height 32px Sets the line height of option list item
--zg-option-list-item-padding 0 15px Sets the padding of option list item
Top

CSS Selector

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

zg-option-list {
  background: red;
}
Top

CSS Shadow Parts

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

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

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

ZGOptionList CSS Shadow Parts
Name Description
list The container for the option list
Top

Slots

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

Top

[api: <zg-option-list>]