UI Schema

Keywords

The reserved $-prefixed vocabulary of the language.

The language reserves every $-prefixed key as a keyword. Everything else is bare and defined by the dialect: an element's type, its props, and the prop names inside props. Keywords fall into five groups.

Document

Identify a schema and its dialect:

KeywordPurposeReference
$idIdentity and revision of a documentDocuments
$schemaDialect identifier of a documentDocuments

Expressions

Resolve a prop value:

KeywordPurposeReference
$dataReference to a data field valueData References
$tReference to a translatable messageTranslation References
$paramsValues interpolated into a messageTranslation References
$tagsElements rendering a message's tagsTranslation References
$argReference to a scoped argumentScoped Arguments

Binding

Bind a prop to a data field:

KeywordPurposeReference
$fieldTwo-way binding to a data fieldForm Fields

$field appears in the same value positions as expressions, but it does more than read: it resolves a value and registers a two-way binding with form state. Every other value-position keyword is a pure read.

Actions

Dispatch handlers on callbacks:

KeywordPurposeReference
$actionName of the handler to dispatchActions
$argsArguments passed to the handlerActions

Control flow

Select or repeat a value:

KeywordPurposeReference
$ifBinary conditional (schema validation)If/Then/Else
$thenValue to use if the condition matchesIf/Then/Else
$elseValue to use if it does not matchIf/Then/Else
$switchMulti-case conditionalSwitch/Case/Default
$caseCase mapping for a switchSwitch/Case/Default
$defaultDefault branch for a switchSwitch/Case/Default
$mapSource array to map overMaps
$eachTemplate applied to each mapped itemMaps

Some keywords are dependent and only valid alongside the keyword that governs them: $then and $else accompany $if; $case and $default accompany $switch; $each accompanies $map; $params and $tags accompany $t; $args accompanies $action.

Scoped argument names

Scoped arguments are reserved names, not keywords: they never appear as keys, only as string values read through the $arg keyword. An enclosing construct injects them into the scope beneath it:

NameInjected byReference
$itemMapsScoped Arguments
$indexMapsScoped Arguments
$contentTranslation tagsTranslation References
$0, $1ActionsScoped Arguments

Structure

Bare, no $: type identifies an element; props carries its configuration. Every other bare key inside props is a dialect-defined prop.

On this page