Skip to content

Installation

Install the runtime package in an application:

Terminal window
npm install mlform

If you want the exact release documented here, install 0.1.5 explicitly:

Terminal window
npm install mlform@0.1.5

Import from the root package for normal application use:

import { mountForm } from "mlform";

Use subpath imports only when you need a specific layer:

import { createForm } from "mlform/engine";
import { createPrimitiveRegistry } from "mlform/primitives";
import { defineTheme } from "mlform/design-system";

For this repository, use Vite+:

Terminal window
vp install
vp check
vp test
vp build

The package declares Node.js >=24.9.0 for local development and CI. The docs workspace is an Astro Starlight app under docs/ and uses the same vp workflow:

Terminal window
cd docs
vp install
vp run typecheck
vp run build
vp run dev

Common mistakes:

MistakeFix
Installing the docs dependencies with npm directlyUse vp install.
Importing test utilities from vitestUse this repo’s Vite+ setup.
Using legacy examples with a class constructorUse mountForm.