CSS Custom Properties Groups

Use CSS custom properties groups to combine multiple separate CSS custom properties into a single compact shorthand control in the Design panel. For example, without a border group, the editor shows three separate full-width controls for border width, style, and color. With the group, they appear as one compact row combining all three.

Each CSS custom property is defined individually in cssCustomProperties with its own cssPropertyType. The display group maps each property to a slot in the shorthand. The slot names match CSS shorthand sub-properties.

These groups only work with CSS custom properties. Standard CSS properties already map one-to-one with their controls and don't need display groups.

Background

Combines background-related CSS custom properties into a single background control.

Note: Specify these additional configurations under a background field in your display group.

backgroundColorstring

CSS custom property key for background-color.


backgroundImagestring

CSS custom property key for background-image.


backgroundPositionstring

CSS custom property key for background-position.


backgroundSizestring

CSS custom property key for background-size.


backgroundRepeatstring

CSS custom property key for background-repeat.


backgroundOriginstring

CSS custom property key for background-origin.


backgroundClipstring

CSS custom property key for background-clip.

Coordinates

Combines directional CSS custom properties into a single control. The following groupType values use this schema: margin, padding, borderColor, borderWidth, borderStyle.

Note: Specify these additional configurations under a field named after your groupType value, such as margin or padding, in your display group.

topstring

CSS custom property key for the top value.


rightstring

CSS custom property key for the right value.


bottomstring

CSS custom property key for the bottom value.


leftstring

CSS custom property key for the left value.

Border

Combines border CSS custom properties into a single border control. The following groupType values use this schema: border, borderTop, borderRight, borderBottom, borderLeft, borderInlineStart, borderInlineEnd.

Note: Specify these additional configurations under a field named after your groupType value, such as border or borderTop, in your display group.

widthstring

CSS custom property key for border width.


stylestring

CSS custom property key for border style.


colorstring

CSS custom property key for border color.

Border radius

Combines border-radius CSS custom properties into a single corner-radius control.

Note: Specify these additional configurations under a borderRadius field in your display group.

topLeftstring

CSS custom property key for the top-left corner radius.


topRightstring

CSS custom property key for the top-right corner radius.


bottomRightstring

CSS custom property key for the bottom-right corner radius.


bottomLeftstring

CSS custom property key for the bottom-left corner radius.

Font

Combines font-related CSS custom properties into a single font control.

Note: Specify these additional configurations under a font field in your display group.

fontStylestring

CSS custom property key for font-style.


fontVariantstring

CSS custom property key for font-variant.


fontWeightstring

CSS custom property key for font-weight.


fontSizestring

CSS custom property key for font-size.


lineHeightstring

CSS custom property key for line-height.


fontFamilystring

CSS custom property key for font-family.

Text decoration

Combines text-decoration CSS custom properties into a single text-decoration control.

Note: Specify these additional configurations under a textDecoration field in your display group.

textDecorationLinestring

CSS custom property key for text-decoration-line.


textDecorationColorstring

CSS custom property key for text-decoration-color.


textDecorationStylestring

CSS custom property key for text-decoration-style.


textDecorationThicknessstring

CSS custom property key for text-decoration-thickness.

Gap

Combines row and column gap CSS custom properties into a single gap control.

Note: Specify these additional configurations under a gap field in your display group.

rowGapstring

CSS custom property key for row-gap.


columnGapstring

CSS custom property key for column-gap.

Examples

Padding

If you define multiple padding CSS custom properties, use a padding display group to tell the editor which property maps to each side. The editor renders them as a single grouped padding control instead of four separate sliders.

Copy

Border

Use a border display group to combine separate width, style, and color custom properties into a single border control in the editor.

Copy

Font

Use a font display group to combine separate font-related custom properties into a single font control in the editor.

Copy

See also

Did this help?