CSS Properties Examples

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.

This article provides practical examples of using CSS properties and CSS custom properties in your component manifests.

Basic CSS property

A simple text component with standard CSS properties:

Copy

Basic CSS custom property

A button component using CSS custom properties (CSS variables):

Copy

Your component CSS must reference these variables:

Copy

Nested elements

Both CSS properties and CSS custom properties can be defined on nested elements within your component.

Copy

Separate design controls are displayed to users for each element when selected.

Button component with states

A button showing CSS properties with state variations:

Copy

Card component with multiple elements

A card component with nested text, image, a drop shadow filter, and a custom property for content spacing:

Copy

Component CSS:

Copy
Did this help?