<zg-column-resize>

Interactive Storybook Playground

The <zg-column-resize> tag is a web component that serves as a handle for resizing a column and used as a CSS target for styling by the developer. The <zg-column-resize> web component should not be accessed specifically beyond styling.

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

ZGColumnResize Relationships
Component Relationship Type Ancestor
ZGHeadCell Parent Generated n/a

Related Web Components

Usage

The <zg-column-resize> element is a generated element added to <zg-head-cell> when the column-resizable attribute is defined.

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

Attributes

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

Top

CSS Variables

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

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

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

ZGColumnResize CSS Variables and Default Values
Name Default Description Demo CSS Ref
--zg-column-resize-background none Sets the background of the resize handle
--zg-column-resize-height 40% Sets the height of the resize handle
--zg-column-resize-top 30% Sets the top position of the resize handle
--zg-column-resize-width 4px Sets the width of the resize handle
Top

CSS Selector

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

zg-column-resize {
  background: red;
}
Top

CSS Shadow Parts

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

zg-column-resize::part(handle) {
  background-color: red;
}

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

ZGColumnResize CSS Shadow Parts
Name Description
handle The resize handle container
icon The resize icon
Top

Slots

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

Top

[api: <zg-column-resize>]