Installation
Install the runtime package in an application:
npm install mlformIf you want the exact release documented here, install 0.1.5 explicitly:
npm install mlform@0.1.5Import 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+:
vp installvp checkvp testvp buildThe 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:
cd docsvp installvp run typecheckvp run buildvp run devCommon mistakes:
| Mistake | Fix |
|---|---|
Installing the docs dependencies with npm directly | Use vp install. |
Importing test utilities from vitest | Use this repo’s Vite+ setup. |
| Using legacy examples with a class constructor | Use mountForm. |