Skip to content

Content Definition

The content object defines component-specific content such as nested elements, labels, or interactive behavior. It supports both unique identification and reference-based reuse.


1. Full Object Format

  • id: follows the same rules outlined in ID Definition. It can be a unique ID, a pointer, or a combination.
  • subset: (optional) a string indicating the component type this style belongs to (e.g., "button", "label"). This helps the parser optimize resolution. If omitted, the parser will infer the component type during resolution.
  • Other keys depend on the component using this content. For detailed content properties, refer to the Components Definition.

Example:

"content": {
  "id": "submit-button-content",
  "subset": "button",
  "label": {
    "default": "Submit",
    "fr": "Soumettre"
  },
  "action": "navigate://url/page-help"
}

In this example:

  • label follows the text object rules (see Text)
  • action follows the action object structure (see Action)

2. Pointer Reference (Short Syntax)

If the content is defined as a string starting with *, it is treated as a reference to another content object.

"content": "*shared-content-submit-button"

This is equivalent to:

"content": {
  "id": "*shared-content-submit-button"
}

The engine will resolve the pointer locally first, then in shared subs.


Summary Table

Format Purpose Example
Full object Inline content definition See above example
String starting with * Pointer to shared/local content object "content": "*shared-confirm-button-content"

For more component-specific keys inside content, refer to the Components Definition.