npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mobx-formkit

v1.1.1

Published

Reactive MobX Form State Management

Readme

MobX Formkit

Reactive MobX Form State Management — extensible validation, nested fields, event hooks, and bindings for any UI framework, with full TypeScript support.

DocumentationQuick StartLive DemoDemo CodeNPMAI SkillsDiscord

npm version npm downloads license bundle size documentation

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.

Features

  • 8 Validation PluginsDVR, VJF, AJV, YUP, JOI, ZOD, VALIBOT & VINEJS: sync & async, extendable, and mixable on the same form.
  • Nested Fields & Arrays — deeply nested field structures with dot notation, dynamic add/remove/move, ordered ArrayMap collections, and full serialization.
  • Event Hooks & Handlers — full lifecycle control: onInit, onChange, onFocus, onBlur, onSubmit, onSuccess, onError & more.
  • UI-Agnostic Core — the same Form instance renders in React, Vue 3, Lit, Angular, Solid, Octane, or vanilla JS with a MobX binding.
  • Field Props Bindings — one-line 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.
  • TypeScript First — generics (Form<F>), typed field access, and autocomplete for nested field paths.
  • Reactive Computed Propsfunctional field props that re-evaluate automatically when their MobX dependencies change.
  • Forms Composerorchestrate multiple forms for wizards and multi-step flows with batch validate/submit/clear.
  • Tiny & SSR-Ready — ~8 kB gzip, tree-shakeable, zero DOM dependencies; works with Next.js, Remix, Vite & any SSR setup.
  • MobX 5, 6 & 7 — one peer dependency range: ^5.15.0 || ^6.0.0 || ^7.0.0.
  • DevTools — a dedicated DevTools package & browser extension to inspect form state, fields, and validation in real time.
  • AI Agent Skills — installable skill files for Cursor, Windsurf, Claude Code, Codebuff & Copilot.

Quick Example

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.

Documentation

| 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 |

Legacy: mobx-react-form (MRF)

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

mobx-react-form version legacy weekly downloads legacy monthly downloads

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.

Contributing

  1. Fork the repository
  2. Make applicable changes (with tests!)
  3. To run tests: npm run test
  4. Ensure builds succeed: npm run build
  5. Commit and run pre-commit checks: npm run commit

New Issues

When 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.

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

MIT © Claudio Savino