Installation
Install the runtime package in an application:
npm install mlformIf you want the exact release documented here, install 0.1.25 explicitly:
npm install mlform@0.1.25Import from the kit for normal application use:
import { mountForm } from "mlform";Use subpath imports only when you need a specific layer:
import { createForm } from "mlform/runtime";import { createPrimitiveRegistry } from "mlform/primitives";import { defineTheme } from "mlform/design";For this repository, use Vite+:
vp installvp checkvp testvp buildThe package supports Node.js >=20.19.0 for Node-based consumers and tooling. 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. |