JsonForms
The main component for rendering a complete JSON Forms instance.Props
The data to be rendered and edited by the form
The JSON Schema that describes the data structure. If not provided, a schema will be automatically generated from the data
The UI Schema that describes how the form should be rendered. If not provided, a UI schema will be automatically generated
Array of renderer registry entries that define how to render different UI schema elements
Array of cell renderer registry entries for rendering table cells
Callback function invoked when the form data changes. Receives the updated data and validation errors
Custom Ajv instance for validation. If not provided, a default instance will be created
Configuration object passed to renderers for customization
Array of UI schema registry entries for dynamic UI schema resolution
Whether the form should be rendered in read-only mode
Validation mode:
ValidateAndShow, ValidateAndHide, or NoValidationInternationalization state including locale and translation functions
Additional validation errors to display alongside schema validation errors
Middleware function for intercepting and transforming core actions
Example
JsonFormsDispatch
Internal dispatch component that selects and renders the appropriate renderer for a UI schema element. Used internally by JsonForms and when building custom renderers.Props
The UI schema element to render
The JSON Schema for the current element
The data path to the current element
Whether the element is enabled for editing
Available renderers (automatically provided when using within JsonForms context)
Available cell renderers (automatically provided when using within JsonForms context)
Example
DispatchCell
Dispatch component for rendering table cells. Selects the appropriate cell renderer based on the schema and UI schema.Props
The UI schema element for the cell
The JSON Schema for the cell data
The data path to the cell value
Whether the cell is enabled for editing
Available cell renderers
UnknownRenderer
Fallback component displayed when no suitable renderer is found for a UI schema element.Props
The type of renderer that could not be found
JsonFormsStateProvider
Context provider component that manages JSON Forms state. Typically used internally by theJsonForms component, but can be used directly for advanced use cases.
Props
Initial state object containing core, renderers, cells, config, and other settings
Callback function invoked when state changes
Middleware function for intercepting core actions
Child components that will have access to the JSON Forms context
Higher-Order Components
The React package provides numerous HOCs for connecting components to JSON Forms state:withJsonFormsControlProps- For control rendererswithJsonFormsLayoutProps- For layout rendererswithJsonFormsArrayLayoutProps- For array layout rendererswithJsonFormsArrayControlProps- For array control rendererswithJsonFormsCellProps- For cell rendererswithJsonFormsEnumProps- For enum control rendererswithJsonFormsOneOfProps- For oneOf combinator rendererswithJsonFormsAnyOfProps- For anyOf combinator rendererswithJsonFormsAllOfProps- for allOf combinator renderers