XTend Documentation
Enable dark mode

XTend Developer Center

Build with XTend today

RMT Reference: Primitives

Primitives are the stable App Platform records in RMT vNext.

Syntax

OperatorFormAllowed contextsParametersFunctionDiagnosticsRelated operators
statestate app.status type object preserve { ... }Top-level, template, primitive surfaceidentifier, type, initial, preserveDeclares persistent or lifecycle-owned app state.State blocks may contain initial only.selector, reduce
selectorselector view from state app.status { ... }Top-level, template, primitive surfaceidentifier, source referenceDerives a view model from state or datasource.Selector blocks allow only where, find, sort by, output.from state, from datasource
datasourcedatasource list from endpoint "/api" { ... }Top-level, template, primitive surfaceidentifier, source kind, source targetDescribes data access without free runtime execution.DataSource blocks allow only method, contract, result, fallback.endpoint, fixture, worker
actionaction save { ... }Top-level, template, primitive surfaceidentifierDeclares typed inputs, reducers, effects and events.Action blocks allow only input, status, effect, reduce, emit, on.emit, reduce, on success ->
portalportal app.root root "#app" layer surfaceTop-level, templateroot, layer, optional zBinds surfaces to a host root and layer.Unexpected inline attributes are rejected.surface, overlay
overlayoverlay notice kind toast portal app.rootTop-level, templatekind, portalDeclares feedback or interaction overlays.Overlay policy lines remain declarative.toast, dialog, on error -> overlay
resourceresource file kind object-url owner surface.previewTop-level, templatekind, owner, sourceDeclares owner-scoped resources with cleanup.Resource blocks allow only import, source, dispose.destroy releases resource
validationvalidation form.contact { ... }Top-level, templateidentifierDeclares field rules and action gates.Only mode, target, field, include are allowed.field, target action
animationanimation app.motion { ... }Top-level, templateidentifierDeclares reusable AnimationEngine presets with effect, keyframes and reduced-motion policy.Keyframes are limited to opacity and transform; filter requires allowFilter.effect, durationMs, keyframe, reducedMotion
transitiontransition route.next { ... }Top-level, templateidentifierDeclares surface changes with effect, duration, timeline and lane.Only transition clauses are allowed in the block; shared-element and layout-flip require layoutKey.trigger action, from surfaces, use animation

Allowed contexts

Primitives may appear top-level, in template and partly in primitive-scoped surfaces. They declare records; they do not execute host code.

Parameters

The main parameters are identifiers, source references, type names, catalog values and static strings.

Description

Primitives bridge RMT authoring and Core format. They compile to state, selector, datasource, action, portal, overlay, resource, validation, transition and surface records.

Examples

template reference.primitives {
  state app.status type object preserve {
    initial {
      text "Ready"
    }
  }

  selector app.statusView from state app.status {
    output StatusView
  }

  datasource app.messages from endpoint "/api/messages" {
    method GET
    result list
    fallback fixture messages.fallback
  }

  action app.refresh {
    input id string
    status app.status
    reduce state.app.status.text = "Loading"
    emit app.refreshed with id input.id
  }

  portal app.root root "#app" layer surface
  overlay app.toast kind toast portal app.root
  resource app.timer kind timer owner surface.home {
    dispose clear
  }

  validation app.form {
    mode blocking
    target action app.refresh
    field app.email required email message "Valid email"
  }

  animation app.motion {
    effect pop
    durationMs 180
    reducedMotion fade
  }

  transition app.next {
    trigger action app.refresh
    from surfaces [home]
    to surfaces [done]
    use animation app.motion
    effect fade
    durationMs 120
    easing "ease-out"
    interrupt replace
    reducedMotion fade
    lane transition
  }

  surface home kind card component x-status {
    portal app.root
    lane visible weight 80 {
      hydrate status.card from selector app.statusView
    }
  }
}

Diagnostics

Missing owners, unknown references, unkeyed repeaters and actions without reducers or payload contracts are reported semantically.

template, surface, lane, from, when, payload, trust boundary.

The RMT reference index shows where primitive records can legally appear in a document. Related article

(c) 2026 - CCS Networks | Powered by XRouter PHP Extension