Renderer registration
JsonFormsRendererRegistryEntry
Registry entry that pairs a tester with a renderer component.Function that returns a numeric rank indicating how well the renderer matches a UI schema element. Higher ranks take precedence.
The renderer component (React, Angular, or Vue component).
Example
Cell renderer registration
JsonFormsCellRendererRegistryEntry
Registry entry for cell renderers used within table controls.Function that returns a rank for cell renderer selection.
The cell renderer component.
Tester functions
RankedTester
Function type for ranked testers.The UI schema element to test.
The JSON schema.
Additional context including root schema and config.
Numeric rank. Returns
-1 (NOT_APPLICABLE) if the renderer cannot handle the element.TesterContext
The root JSON Schema of the form. Used to resolve
$ref references.Form-wide configuration object.
Common testers
JSON Forms provides built-in testers:isStringControl- Tests for string controlsisBooleanControl- Tests for boolean controlsisIntegerControl- Tests for integer controlsisNumberControl- Tests for number controlsisDateControl- Tests for date controlsisTimeControl- Tests for time controlsisDateTimeControl- Tests for datetime controlsisEnumControl- Tests for enum controlsisOneOfEnumControl- Tests for oneOf enum controlsisObjectArrayControl- Tests for object array controlsisPrimitiveArrayControl- Tests for primitive array controls
Tester utilities
Creates a ranked tester with the specified rank.
Combines testers with AND logic.
Combines testers with OR logic.
Negates a tester.
Renderer props
OwnPropsOfRenderer
Props passed directly to a renderer component.The UI schema element to render.
The JSON schema that describes the data.
Whether the element should be enabled.
Whether the element should be visible.
Instance path. Required when the data path cannot be inferred from the UI schema (e.g., nested controls).
Available renderers for child elements.
Available cell renderers.
Available UI schema registry entries.
StatePropsOfRenderer
Props derived from the JSON Forms state.Form configuration options.
The UI schema element to render.
The JSON schema.
The data to render.
Whether the element is enabled.
Whether the element is visible.
Instance path where data is written.
Available renderers.
Available cell renderers.
Control renderer props
OwnPropsOfControl
Own props specific to control renderers.Unique identifier for the control.
The control element from UI schema.
OwnPropsOfRenderer.
StatePropsOfControl
State props for control renderers.The current value of the control.
Computed label text (includes internationalization and schema title).
Control description from schema.
Combined error message string from validation.
Whether the field is required.
Unique identifier for the control.
The root schema.
Base key for internationalization.
The control element.
StatePropsOfRenderer.
DispatchPropsOfControl
Dispatch props for control renderers to update data.Function to update data at the specified path.
Example usage
Layout renderer props
StatePropsOfLayout
State props for layout renderers.Layout direction (horizontal or vertical).
Optional label for the layout (e.g., for groups).
StatePropsOfRenderer.
Array control props
StatePropsOfArrayControl
State props for array control renderers.The schema of the array itself.
The schema of array items (resolved from
arraySchema.items).Validation errors for array items.
StatePropsOfControl.
DispatchPropsOfArrayControl
Dispatch props for array control renderers.Function that returns a handler to add an item to the array.
Function that returns a handler to remove items from the array.
Function that returns a handler to move an item up.
Function that returns a handler to move an item down.
Combinator renderer props
CombinatorRendererProps
Props for combinator renderers (oneOf, anyOf, allOf).The combinator schema.
Data path.
The UI schema element.
Root schema for resolving references.
Current data value.
Index of the schema that best matches the current data.
State management
JsonFormsCore
Core JSON Forms state.The form data.
The JSON schema.
The UI schema.
Validation errors from Ajv.
Additional custom validation errors.
Ajv validation function.
Ajv instance used for validation.
Validation mode:
ValidateAndShow, ValidateAndHide, or NoValidation.Mapper functions
JSON Forms provides mapper functions to connect state to renderer props.mapStateToControlProps
mapDispatchToControlProps
mapStateToArrayControlProps
mapDispatchToArrayControlProps
Example: Custom renderer
UI schema registry
JsonFormsUISchemaRegistryEntry
Registry entry for dynamic UI schema selection.Function that returns a rank for UI schema selection based on schema and path.
The UI schema to use when the tester matches.