<zg-sort-menu>
Interactive Storybook Playground
The <zg-sort-menu> tag is the container for the menu that appears when clicking on the control bar's sort button. It is used as a
CSS target for styling by the developer. The <zg-sort-menu> web component should not be accessed specifically beyond styling.

Related Web Components
Usage
The <zg-sort-menu> element is a generated element added to <zing-grid> when the sort attribute is defined and the grid is set to layout="card". In row layout, sorting is handled directly from the column headers, so the sort menu is not used.
<zing-grid layout="card" sort src="https://cdn.zinggrid.com/datasets/user-roles.json"> </zing-grid>
Attributes
There are no attributes available for the <zg-sort-menu> web component.
CSS Variables
<zg-sort-menu> can be styled with CSS variables, like so:
:root { --zg-sort-menu-background: red; }
Below is a list of all the associated --zg-sort-menu 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 |
|---|
CSS Shadow Parts
<zg-sort-menu> exposed elements within the shadow can be styled by CSS shadow parts, like so:
zg-sort-menu::part(sort-menu) { background-color: red; }
Below is a list of all the associated ZGSortMenu 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 |
|---|
Slots
There are no slots available for the <zg-sort-menu> web component.
[api: <zg-sort-menu>]