Installation

Schema Engine is a set of packages. You install the engine and one renderer: React with a shadcn registry that copies the field and recipe source into your project, or Radiant, which ships its elements in the package.

Requirements

  • Node.js 24 or newer for the tooling this project is built and tested with (installs, builds and the docs). The published packages declare no Node engine of their own; their runtime requirements are the peer dependencies below.
  • pnpm. The commands here use it; npm and yarn take the same package names.
  • React 19 for the React renderer, in a project set up with shadcn/ui (a components.json and the @/ import alias).

Choose a renderer

RendererPackageForm stateStyling
React@schema-engine/forms-reactThe engine's own container, built inSource you own, copied from the shadcn registry; Tailwind helps
Radiant@schema-engine/forms-radiantThe engine's own container, built inThree CSS imports: a Radiant UI theme, its styles and the package's

Both render the same FormConfig JSON and keep their form state in the engine's own container, so a form validates, resets and submits the same way in either. See Form state.

The engine

Every setup needs the engine, the layout package and Zod:

pnpm add @schema-engine/forms @schema-engine/layout zod

React

Add the renderer and its peers, as the Quick Start and the Forms React guides use them:

pnpm add @schema-engine/forms-react react react-dom

Then copy the form elements and, when you want a ready-made layout, the default recipes from the Schema Engine shadcn registry:

pnpm dlx shadcn@latest add andeeplus/schema-engine/schema-form andeeplus/schema-engine/schema-engine-form-recipes

The registry has one aggregate per component base: schema-form for Base UI, schema-form-radix for Radix UI and schema-form-aria for React Aria, with matching schema-engine-form-recipes-radix and -aria recipe items. Install one base per app. Registries lists every item.

What you now own

The command copies source files into your project, and they are yours to read, edit and delete:

  • components/schema-engine/forms/ holds the form elements, the generated registrations.ts barrel, and recipes/ with the shells, blocks, their CSS files and the generated recipes/registrations.ts barrel.
  • components/ui/schema-engine/components/ holds the primitives the elements share, such as the field wrapper and controls.css.

The package keeps the engine, the renderer and the hooks; the copied files are plain React that use your own ui components (Button, Input, Label). To change how an element or a shell looks, edit its file. To drop one, remove it from the registration barrel. To add your own, register it next to them with createFormEngine({ elements: [...schemaFormRegistrations, MyElement] }). A later shadcn add overwrites a file only after it asks.

Import the styles

The recipes copy their CSS with them, and nothing imports it for you. Import it once in your global stylesheet, after Tailwind. The path is relative to that file (./components/... from a Vite src/index.css, ../components/... from a Next.js app/globals.css):

@import 'tailwindcss';
@import './components/schema-engine/forms/recipes/recipes.css' layer(components);
@import './components/ui/schema-engine/components/controls.css';

recipes.css goes into the components layer so your Tailwind utilities and classes sit above it; controls.css goes unlayered because a shadcn control sets its height with a Tailwind utility that outranks every layered rule. View recipes says more, and Styling and layout covers sizes, surfaces and tokens.

Create the engine

Import the generated barrels from the copied files and build the engine once:

import { createFormEngine } from '@schema-engine/forms';
import { schemaFormRegistrations } from '@/components/schema-engine/forms/registrations';
import { schemaFormRecipeRegistrations } from '@/components/schema-engine/forms/recipes/registrations';

export const formEngine = createFormEngine({
	elements: schemaFormRegistrations,
	recipes: schemaFormRecipeRegistrations,
});

These imports resolve only after the shadcn add above has copied the files. The Quick Start renders a form from here.

Radiant

Radiant needs no registry and no React. Install the renderer and its peers:

pnpm add @schema-engine/forms-radiant @ecopages/radiant-ui @ecopages/radiant @ecopages/jsx @ecopages/signals

Load one Radiant UI theme, its stylesheet and the renderer's stylesheet once, then create the engine with createRadiantFormEngine({ elements: schemaFormRegistrations }) (both come from @schema-engine/forms-radiant). Forms Radiant: Getting Started has the stylesheet imports, the peer versions and a full example.

Optional packages

# Standalone action system (the forms packages already use it for submission)
pnpm add @schema-engine/actions

# YAML documents with line-accurate errors (@schema-engine/registry/yaml)
pnpm add @schema-engine/registry yaml

Package overview

PackageDescription
@schema-engine/formsCore form engine (framework-agnostic)
@schema-engine/forms-reactReact components and hooks
@schema-engine/forms-radiantRadiant (Ecopages) renderer
@schema-engine/actionsDomain-agnostic action system
@schema-engine/layoutGrid and appearance theme (neutral)
@schema-engine/registryRegistries, and YAML documents (/yaml)

Peer dependencies

The ranges are the ones in the package manifests:

  • zod ^4.0.17
  • typescript ^5.4
  • react and react-dom ^19 (React renderer)
  • yaml ^2.8.0 (optional; needed only for @schema-engine/registry/yaml)
  • vitest ^4.0.13 (optional; needed only for @schema-engine/forms/testing, the conformance suite of a form state container)
  • @ecopages/radiant, @ecopages/jsx and @ecopages/signals >=0.12.0, and @ecopages/radiant-ui >=0.6.0 (Radiant renderer; Forms Radiant: Getting Started has the rest)

TypeScript configuration

Schema Engine is built with TypeScript. Recommended tsconfig.json:

{
	"compilerOptions": {
		"strict": true,
		"esModuleInterop": true,
		"skipLibCheck": true,
		"moduleResolution": "bundler",
		"jsx": "react-jsx"
	}
}

Verify the install

pnpm list --depth 0 | grep schema-engine

You should see @schema-engine/forms and your renderer listed with their versions. To work on Schema Engine itself rather than use it, see CONTRIBUTING.md.

What's Next?