Installation Overview
Install Schemaform, then browse or copy source only when you want to own a layer.
Schemaform is designed to be installed first. The main package entrypoint exports the core form model, React hooks, default renderer, widgets, registry helpers, and builder helpers:
npm install schemaformimport type { FormDefinition } from "@mackehansson/schemaform";
import { SchemaForm } from "@mackehansson/schemaform-shadcn";
<SchemaForm definition={definition} onSubmit={console.log} />;Use this path until you have a concrete reason to own part of the implementation.
Entry Points
Most users import from the main entrypoint:
import {
SchemaForm,
FormBuilder,
useFormRenderer,
useFormBuilder,
type FormDefinition,
} from "@mackehansson/schemaform";Advanced users can import narrower surfaces:
import { resolveForm } from "@mackehansson/schemaform/core";
import { useFormRenderer } from "@mackehansson/schemaform/react";
import { SchemaForm } from "@mackehansson/schemaform-shadcn";schemaform/core is framework-agnostic. schemaform/react is for custom React renderers and builders. schemaform/shadcn is the first-party renderer and builder UI.
Owning The Source
The repository remains copy-friendly. If you want to replace the default renderer, deeply customize widgets, or fork the builder into product code, browse the source and copy the files you want to own.
The source map pages in this section show where each layer lives and what it depends on. They are not required for normal installation.
Upgrade Model
Installed users receive package upgrades through normal dependency updates. Copied source is yours; compare future package changes against your local implementation and adopt changes deliberately.
For most applications, keep Schemaform installed and customize through props, validators, translation, and the widget registry before copying source.