Schemas
Schemas define the structure and validation rules for your UI specs.
What is a Schema?
A schema defines the JSON structure that describes your UI. It includes:
- Element structure — How components are nested and referenced
- Property types — What props each component accepts
- Data binding syntax — How to reference dynamic data
- Action format — How user interactions are defined
Schema-Agnostic by Design
json-render can work with any JSON schema. @json-render/core provides the primitives to define catalogs and renderers for any format:
- @json-render/react — The built-in flat element tree schema
- A2UI — Google's Agent-to-User Interaction protocol
- Adaptive Cards — Microsoft's platform-agnostic UI format
- AG-UI — CopilotKit's Agent User Interaction Protocol
- OpenAPI/Swagger — API documentation schemas for dynamic forms
- Custom schemas — Design your own format tailored to your domain
See the Custom Schema guide to learn how to implement support for any schema.
Built-in Schema
@json-render/react uses a flat element tree schema with a root key and elements map:
Schema Components
Element Structure
In the built-in schema, each element in the elements map has this structure:
Data Binding Syntax
Reference dynamic data using $state expressions in props. The value is a JSON Pointer path into the state model:
json-render also supports $item and $index expressions for lists, two-way binding via $bindState / $bindItem, and conditional props. See Data Binding for the full reference.
Action Format
Actions are defined in the catalog and referenced from components. The renderer handles action execution:
Custom Schemas
@json-render/core is schema-agnostic. You can define any JSON structure:
Schema vs Catalog
The schema and catalog work together but serve different purposes:
- Schema — Defines the JSON structure (how elements are organized)
- Catalog — Defines available components and their props (what can be used)
The schema is the grammar; the catalog is the vocabulary.
Next
Learn about specs — the actual JSON documents that describe your UI.