Built-in Schema Components
FieldWrap
FieldWrap is a schema registry component ($cmp: 'FieldWrap') defined in src/forms/components/FieldWrap.tsx. It is not a general-purpose layout primitive; the engine instantiates it when the schema references this $cmp key.
Basic Usage
Use FieldWrap when several related fields should read like one grouped section with a shared label and grouped error display.
Role
- Subscribes to
useSchemaEngineContext()and the form store’s error map. - Collects nested field names from
schemaNode.childrento aggregate validation messages for the wrapped subtree. - Renders
FieldLayoutwith merged errors, optionalInlineFieldErrorVisibilityContextsuppression for nested inline errors, and reformats some attribute-style messages using the wrapperlabel.
Typical schema
json
{
"$cmp": "FieldWrap",
"name": "settings",
"label": "Settings",
"instructions": "Optional help text.",
"required": true,
"children": [
{ "$field": "text", "name": "settings.title", "label": "Title" }
]
}Props like name, label, instructions, required, warning come from the schema node (and merge with top-level keys the engine forwards).
Registry
Registered by default in registry.ts as FieldWrap. Override by calling registerFormComponent('FieldWrap', YourWrap) if you need a different wrapper layout (last write wins).
Related
Edit this page
Last updated: May 22, 2026, 6:53 PM