Schemas / UI (control surfaces)

rig.ui.control

v0.31.0 · draft 13 fields 5 required

Fields

FieldTypeMeaning
panel entity required Owning rig.ui.panel
group entity optional Optional. Owning rig.ui.group; absent or null = direct child of the panel
order int required Sort key within the panel or group
target entity required Entity whose field is shown / edited
propertyKey string required Field name or dotted path on the target
type propertyType required Datatype id from properties.md (or host-prefixed)
min float optional Optional lower bound for numeric widgets
max float optional Optional upper bound
step float optional Optional step for numeric widgets
enabled bool optional Whether the control accepts input
readOnly bool optional Show value without editing
options array<string> optional Optional enum choices when the target schema does not constrain them
widget enumauto · slider · knob · toggle · field · dropdown · color · xy optional Advisory hint: auto, slider, knob, toggle, field, dropdown, color, xy

A view over one POD field on a target entity - never a second store. Addressing reuses the rig.mod.binding convention (target + propertyKey, including dotted paths like position.y).

widget is a hint a host may ignore. Colour pickers and knobs vs sliders remain fulfillment - see properties.md. Domain meaning stays in schema field names, not extra datatype ids.

Required: panel, order, target, propertyKey, type.

JSON Schema

Resolves at https://rig.works/schemas/rig.ui.control.schema.jsonraw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.ui.control.schema.json",
  "title": "rig.ui.control",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "panel": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "group": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "order": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "target": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "propertyKey": {
      "$ref": "./_defs.schema.json#/$defs/string"
    },
    "type": {
      "$ref": "./_defs.schema.json#/$defs/propertyType"
    },
    "min": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "max": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "step": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "enabled": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    },
    "readOnly": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    },
    "options": {
      "type": "array",
      "items": {
        "$ref": "./_defs.schema.json#/$defs/string"
      }
    },
    "widget": {
      "type": "string",
      "enum": [
        "auto",
        "slider",
        "knob",
        "toggle",
        "field",
        "dropdown",
        "color",
        "xy"
      ]
    }
  },
  "required": [
    "panel",
    "order",
    "target",
    "propertyKey",
    "type"
  ],
  "description": "View over one POD field — never a second store. group is optional; widget is an advisory hint a host may ignore."
}

Seen in

portable-tool.json · ui-panel.json