Skip to content

Mental Model

MLForm has one job: keep form UI, validation state, submitted payloads, and model reports consistent.

ConceptRole
SchemaDescribes fields, reports, labels, validation limits, and conditional behavior.
EngineOwns normalized ids, current values, field state, report state, validation, and submit state.
TransportSends serialized values to a backend or local model.
PrimitivesRender engine descriptors as Web Components.
Design systemResolves themes, recipes, density, motion, and CSS tokens.
Mounted handleOwns cleanup, design updates, and access to the underlying form controller.

Most applications should start at the kit layer:

import { mountForm } from "mlform";

Use the engine directly when you want headless state without the built-in UI. Use primitives directly when you want MLForm’s Web Components but your own application shell.