Standard CSS Properties

Alpha: Editor React Components are currently in alpha. This feature is subject to change and may have bugs, issues, and limitations. We're actively improving it based on your feedback.

The cssProperties property of the manifest lets you define standard CSS properties that Wix users can customize through the editor. The editor reads these definitions and generates the appropriate design panel controls for each property. The key must be a valid CSS property name, such as border, backgroundColor, or fontSize. The editor applies the value directly to the element that matches the selector.

Where to define

You can define cssProperties in editorElement and in elements of type inlineElement.

cssProperties compared to cssCustomProperties

The manifest supports two ways to define styling: cssProperties and cssCustomProperties.

Use cssProperties when you want to apply a standard CSS property directly to an element. The editor maps the property to the appropriate design panel control automatically.

Consider cssCustomProperties instead when:

  • You need a variable name that isn't a standard CSS property.
  • The same value is used across multiple CSS rules.
  • You want a custom dropdown with specific options.
  • You need numeric values with min and max constraints.

CSS property item

Each item defined under cssProperties accepts the following properties:

displayNamestring

Label shown in the editor panel. Maximum 100 characters. Translatable.


defaultValuestring

Initial CSS value shown in the design panel.


statesDefaultValuesobject

Default CSS values for defined component states.


disableEditingboolean

Disables the ability to edit this CSS property item.


filterFilter

Which filter effects to show in the editor panel. Only relevant for the filter property.


backdropFilterBackdropFilter

Which backdrop-filter effects to show in the editor panel. Only relevant for the backdropFilter property. Uses the same FilterFunction values as filter.


displayDisplay

Which display options to show in the editor panel. Only relevant for the display property.


writingModeWritingMode

Which text direction options to show in the editor panel. Only relevant for the writingMode property.


backgroundBackground

Which background options to show in the editor panel. Only relevant for the background property.

CSS shorthand

CSS shorthand properties allow you to set multiple related CSS properties with a single declaration. When you define a shorthand property in the manifest, the editor panel displays separate controls for the core related properties.

bordershorthand

Defines all border-related properties for all sides. Includes borderWidth, borderStyle, borderColor, and all directional variants.


backgroundshorthand

Sets all background-related properties: backgroundColor, backgroundImage, backgroundSize, backgroundPosition, backgroundRepeat, backgroundClip, backgroundOrigin, backgroundAttachment.


marginshorthand

Controls spacing outside the element on all sides: marginTop, marginRight, marginBottom, marginLeft, marginInlineStart, marginInlineEnd.


paddingshorthand

Controls internal spacing inside the element: paddingTop, paddingRight, paddingBottom, paddingLeft, paddingInlineStart, paddingInlineEnd.


fontshorthand

Sets all font-related properties: fontFamily, fontSize, fontWeight, fontStyle, fontVariant, fontStretch, lineHeight.


textDecorationshorthand

Defines all aspects of text decoration: textDecorationLine, textDecorationColor, textDecorationStyle, textDecorationThickness.


borderRadiusshorthand

Sets corner rounding for all corners: borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius, and logical equivalents.

Examples

Basic CSS property with state defaults

The following defines a border property with a dashed green default and a solid red override for the error state.

Copy

Empty object CSS properties

You can define a CSS property with an empty object to enable it with default editor behavior.

Copy

CSS shorthand

When you define a shorthand property like border, the editor displays separate controls for color, width, and style for all directional variants.

Copy

Filter and backdrop filter

The following defines a filter property with blur, drop shadow, and contrast effects, and a backdropFilter with blur, brightness, and saturation effects.

Copy

Display

The following defines a display property that lets Wix users choose between none, flex, and block layouts.

Copy

Writing mode

The following defines a writingMode property that lets Wix users choose between horizontal and vertical text directions.

Copy

Background

The following defines a background property that opens the image media manager when a Wix user selects a background.

Copy

See also

Did this help?