experiment_id: web-retrieval-v1
fixture_id: /docs/api/tags/zg-card-resize
mode: provenance
representation: html
origin_response_id: bd2aebb8c65daa48f024f879f2743fb4
version: 2026-10-21
version_created_at_utc: 2026-10-21T20:42:35.618Z
version_nonce: 7110537948694e24839b73ba296a492b
generated_at_utc: 2026-10-26T03:45:19.328Z
response_nonce: 771c3c5a08ca67c6c5fb51e9a9ae5db7
Docs Version 1

<zg-card-resize>

Interactive Storybook Playground

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

Image of the DOM relationship for the zg-card-resize web component tag

Related Web Components

Usage

The <zg-card-resize> element is a generated element added to <zing-grid> when the card-resizable attribute is defined and the grid is set to layout="card". It opens a menu, from the control bar's card resize button, that lets the user pick between a "Responsive" card size range (a Min/Max cards-per-row range with a preferred size scale) and a "Fixed" single cards-per-row size.

<zing-grid layout="card" card-resizable
  src="https://cdn.zinggrid.com/datasets/user-roles.json">
</zing-grid>

The card-resizable attribute also accepts a "fixed" value, which starts the menu in "Fixed" mode instead of the default "Responsive" mode.

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

Attributes

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

Top

CSS Variables

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

:root {
  --zg-card-resize-background: red;
}

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

ZGCardResize CSS Variables and Default Values
Name Default Description Demo CSS Ref
Top

CSS Shadow Parts

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

zg-card-resize::part(header) {
  background-color: red;
}

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

ZGCardResize CSS Shadow Parts
Name Description
Top

Slots

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

Top

[api: <zg-card-resize>]