Reactive MobX Form State Management
See the codeReactive MobX Form State Management — extensible validation, nested fields, event hooks, and bindings for any UI framework, with full TypeScript support.
Documentation • Quick Start • Live Demo • Demo Code • NPM • AI Skills • Discord
MobX Formkit is a form state management library built on MobX observables. The core is UI-agnostic — it depends only on mobx and renders in React, Vue 3, Lit, Angular, Solid, or vanilla JS through the matching MobX binding. Define your fields declaratively and get reactivity, validation, change tracking, and component bindings automatically.
Read the full documentation or jump straight to the Quick Start.
ArrayMap collections, and full serialization.onInit, onChange, onFocus, onBlur, onSubmit, onSuccess, onError & more.Form instance renders in React, Vue 3, Lit, Angular, Solid, Octane, or vanilla JS with a MobX binding.bind() for standard inputs, plus custom rewriters & templates for Material UI, Ant Design, React Aria, Headless UI, React Widgets, React Select, Chakra UI, PrimeReact & more.Form<F>), typed field access, and autocomplete for nested field paths.^5.15.0 || ^6.0.0 || ^7.0.0.npm install --save mobx-formkit
import { Form } from "mobx-formkit";
import dvr from "mobx-formkit/lib/validators/DVR";
import validatorjs from "validatorjs";
const plugins = {
dvr: dvr({ package: validatorjs }),
};
const fields = [
{
name: "email",
label: "Email",
placeholder: "Insert Email",
rules: "required|email|string|between:5,25",
},
{
name: "password",
label: "Password",
placeholder: "Insert Password",
rules: "required|string|between:5,25",
type: "password",
},
{
name: "passwordConfirm",
label: "Password Confirmation",
placeholder: "Confirm Password",
rules: "required|string|same:password",
type: "password",
},
];
const hooks = {
onSuccess(form) {
alert("Form is valid! Send the request here.");
},
onError(form) {
alert("Form has errors!");
},
};
const form = new Form({ fields }, { plugins, hooks });
import React from "react";
import { observer } from "mobx-react";
export default observer(({ form }) => (
<form onSubmit={form.onSubmit}>
<label htmlFor={form.$("email").id}>{form.$("email").label}</label>
<input {...form.$("email").bind()} />
<p>{form.$("email").error}</p>
<button type="submit">Submit</button>
<button type="button" onClick={form.onClear}>
Clear
</button>
<button type="button" onClick={form.onReset}>
Reset
</button>
<p>{form.error}</p>
</form>
));
Follow the full Quick Start guide or the class-based setup for the complete walkthrough.
| Topic | Links |
|---|---|
| Getting Started | Quick Start · Class-based Setup · TypeScript · UMD Setup |
| Form & Fields | Form Instance · Form Options · Defining Fields |
| Actions | Form Actions · Get, Set & Update · Add, Delete & Move · Validation & Submit |
| Validation | Choosing a Plugin · Plugins & Packages · Validation Lifecycle |
| Events | Event Handlers · Event Hooks · Validation Hooks |
| Bindings | Default Bindings · Custom Bindings |
| API Reference | Form Properties · Form Methods · Fields Properties · Fields Methods |
| Advanced | Overview · Wizard (multi-step) · Sortable Lists · File Upload |
| Extra | Computed Props · Input & Output Converters · Forms Composer · Recipes & Patterns · Troubleshooting & FAQ |
| Guides | Migration Guide · Error Handling · Performance & SSR · Render Engine Support |
| Ecosystem | DevTools · AI Agent Skills · Live Demo |
MobX Formkit is the successor of mobx-react-form (MRF). The legacy package has been renamed and deprecated on npm — the codebase and its API continue here. To migrate, swap the package and update your imports:
npm uninstall mobx-react-form
npm install --save mobx-formkit
As of August 2026, the final legacy release ([email protected]) still sees ~8.0k downloads/week, ~47.4k downloads/month, and ~664k downloads/year (npm API). If you are still on MRF, this is the drop-in replacement.
See the Migration Guide on the docs for breaking changes across major versions.
npm run testnpm run buildnpm run commitWhen opening new issues, provide the setup of your form in a CodeSandbox.
These issues, and the ones which provides also PR with failing tests will get higher priority.
This project exists thanks to all the people who contribute.
Thank you to all our backers! 🙏 [Become a backer]
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
1,194 followers · starred Nov 2016
696 followers · starred Dec 2016
142 followers · starred Sep 2016
41 followers · starred Mar 2017
Reactive MobX Form State Management
See the codeReactive MobX Form State Management — extensible validation, nested fields, event hooks, and bindings for any UI framework, with full TypeScript support.
Documentation • Quick Start • Live Demo • Demo Code • NPM • AI Skills • Discord
MobX Formkit is a form state management library built on MobX observables. The core is UI-agnostic — it depends only on mobx and renders in React, Vue 3, Lit, Angular, Solid, or vanilla JS through the matching MobX binding. Define your fields declaratively and get reactivity, validation, change tracking, and component bindings automatically.
Read the full documentation or jump straight to the Quick Start.
ArrayMap collections, and full serialization.onInit, onChange, onFocus, onBlur, onSubmit, onSuccess, onError & more.Form instance renders in React, Vue 3, Lit, Angular, Solid, Octane, or vanilla JS with a MobX binding.bind() for standard inputs, plus custom rewriters & templates for Material UI, Ant Design, React Aria, Headless UI, React Widgets, React Select, Chakra UI, PrimeReact & more.Form<F>), typed field access, and autocomplete for nested field paths.^5.15.0 || ^6.0.0 || ^7.0.0.npm install --save mobx-formkit
import { Form } from "mobx-formkit";
import dvr from "mobx-formkit/lib/validators/DVR";
import validatorjs from "validatorjs";
const plugins = {
dvr: dvr({ package: validatorjs }),
};
const fields = [
{
name: "email",
label: "Email",
placeholder: "Insert Email",
rules: "required|email|string|between:5,25",
},
{
name: "password",
label: "Password",
placeholder: "Insert Password",
rules: "required|string|between:5,25",
type: "password",
},
{
name: "passwordConfirm",
label: "Password Confirmation",
placeholder: "Confirm Password",
rules: "required|string|same:password",
type: "password",
},
];
const hooks = {
onSuccess(form) {
alert("Form is valid! Send the request here.");
},
onError(form) {
alert("Form has errors!");
},
};
const form = new Form({ fields }, { plugins, hooks });
import React from "react";
import { observer } from "mobx-react";
export default observer(({ form }) => (
<form onSubmit={form.onSubmit}>
<label htmlFor={form.$("email").id}>{form.$("email").label}</label>
<input {...form.$("email").bind()} />
<p>{form.$("email").error}</p>
<button type="submit">Submit</button>
<button type="button" onClick={form.onClear}>
Clear
</button>
<button type="button" onClick={form.onReset}>
Reset
</button>
<p>{form.error}</p>
</form>
));
Follow the full Quick Start guide or the class-based setup for the complete walkthrough.
| Topic | Links |
|---|---|
| Getting Started | Quick Start · Class-based Setup · TypeScript · UMD Setup |
| Form & Fields | Form Instance · Form Options · Defining Fields |
| Actions | Form Actions · Get, Set & Update · Add, Delete & Move · Validation & Submit |
| Validation | Choosing a Plugin · Plugins & Packages · Validation Lifecycle |
| Events | Event Handlers · Event Hooks · Validation Hooks |
| Bindings | Default Bindings · Custom Bindings |
| API Reference | Form Properties · Form Methods · Fields Properties · Fields Methods |
| Advanced | Overview · Wizard (multi-step) · Sortable Lists · File Upload |
| Extra | Computed Props · Input & Output Converters · Forms Composer · Recipes & Patterns · Troubleshooting & FAQ |
| Guides | Migration Guide · Error Handling · Performance & SSR · Render Engine Support |
| Ecosystem | DevTools · AI Agent Skills · Live Demo |
MobX Formkit is the successor of mobx-react-form (MRF). The legacy package has been renamed and deprecated on npm — the codebase and its API continue here. To migrate, swap the package and update your imports:
npm uninstall mobx-react-form
npm install --save mobx-formkit
As of August 2026, the final legacy release ([email protected]) still sees ~8.0k downloads/week, ~47.4k downloads/month, and ~664k downloads/year (npm API). If you are still on MRF, this is the drop-in replacement.
See the Migration Guide on the docs for breaking changes across major versions.
npm run testnpm run buildnpm run commitWhen opening new issues, provide the setup of your form in a CodeSandbox.
These issues, and the ones which provides also PR with failing tests will get higher priority.
This project exists thanks to all the people who contribute.
Thank you to all our backers! 🙏 [Become a backer]
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
1,194 followers · starred Nov 2016
696 followers · starred Dec 2016
142 followers · starred Sep 2016
41 followers · starred Mar 2017