Repo of the Day
fabian-hiller/modular-forms
Published: Jun 12, 2023
Open repository ↗The modular and type-safe form library for SolidJS, Qwik, Preact and React
Summary
Modular Forms is a TypeScript form-handling library that works with SolidJS, Qwik, Preact, and React. It focuses on type safety, small bundle size, and fine-grained DOM updates by building on each framework's reactivity model. The README notes the project is in maintenance mode and points new projects to its successor, Formisch.
What it is useful for
Modular Forms targets engineers who need form logic — validation, state, and submission handling — without pulling in a heavy dependency or a coupled UI. Its modular design means you import only the pieces you need, and because it is headless, you keep full control of the markup. The library supports validating anything from email fields to file inputs and is designed to work with all native HTML form fields.
It is a fit when:
- You want type-safe form schemas and editor autocompletion for field names and validators
- Bundle weight matters (the README states the entry point is 3 KB and the design avoids extra dependencies beyond the host framework)
- You prefer fine-grained reactivity over re-rendering whole forms
- You want progressively enhanced forms via actions
The README credits React Hook Form and Formik as inspirations, so engineers familiar with those APIs may find the patterns recognizable.
How engineers can use it
The README links to a live playground at modularforms.dev/playground for trying the library without local setup. The README itself does not include step-by-step installation commands or a copy-paste setup snippet, so the exact install lines, peer-dependency requirements, and per-framework wiring are not visible from the source provided here. Readers should consult the full README on GitHub for the current setup instructions for their target framework (Solid, Qwik, Preact, or React).
Documented considerations:
- The project is in maintenance mode; the README explicitly recommends the successor Formisch for new projects
- It is headless, so styling and component composition are entirely up to the engineer
- No dependencies beyond the host framework, so you bring your own UI primitives
- License is MIT, so it can be used in commercial and open source work