API Reference
API Reference
Source-derived API reference for the main package and advanced subpath entrypoints.
The main entrypoint is the recommended import path:
import {
SchemaForm,
FormBuilder,
useFormRenderer,
useFormBuilder,
type FormDefinition,
} from "@mackehansson/schemaform";The API reference is split by responsibility so advanced users can find the layer they need:
schemaformincludes the full installed surface.schemaform/coreis the headless engine: Form Definition types, resolution, Rules Engine, validation, renderability, migration, and builder mutations.schemaform/reactis the React hook layer:useFormRendererfor Form Renderers anduseFormBuilderfor admin surfaces.schemaform/shadcnis the first-party Renderer and Form Builder UI, plus its Registry and widget helpers.
Type tables are generated at build time with fumadocs-typescript from real TypeScript source. The prose explains when to use each export; the tables stay tied to the exported source types.
Reference Sections
Start with the main package. Use Core when you need the domain model or pure functions. Use React when you are building a Renderer or Form Builder around hooks. Use ShadCN when you want the drop-in components or want to extend the first-party Registry.
| Entry point | Use for |
|---|---|
schemaform | Default installed API for React apps |
schemaform/core | Framework-agnostic model, resolver, validator, rules, migrations, and mutations |
schemaform/react | Controlled React hooks over Core |
schemaform/shadcn | First-party ShadCN/RHF Renderer, Form Builder, Registry, and widgets |