file Pseudo-component

A special type of component which allows for the definition of the component to be in a separate file, while the id and constraints remain in the parent JSON.

This is useful for having shared components in separate files, identified and laid out differently.

{
  "constraints": {
    "region": "top"
  },
  "id": "okbutton",
  "type": "file",
  "src": "button.json"
}

How this differs from {file:filename}

While both of these achieve a similar goal, the "type": "file" does some specific processing to allow the constraints and identifier to exist outside of the referring file, while the component type is defined within the file.

Using {file:filename} will simply replace the placeholder with the contents of the file, as if it always existed within the JSON.