Getting started
Install the package, wire your first form, and submit with fetch in under five minutes.
@samline/forms binds to an HTMLFormElement, keeps field state in sync with the DOM, runs validation, lets you react to changes via watchers or subscribers, and ships a serialized payload for fetch flows. It is the only runtime entrypoint since v2.0.0 — no framework wrapper, no virtual DOM, just one factory and a focused method surface.
<script> for the browser global (window.Forms).@samline/formatter for phone, card, numeral and date masks — installs only when you need it.FormController so setup reads fluently.watch, observe, and subscribe give you per-field and whole-form reactions without manual plumbing.Getting started
Install the package, wire your first form, and submit with fetch in under five minutes.
API reference
Every public method, option, type and helper documented with signatures and runnable examples.
Browser global
Use the pre-bundled window.Forms global when you don’t have a bundler — perfect for Shopify, WordPress, or classic templates.
Recipes
End-to-end patterns: login, server errors, multi-step wizards, autosave, formatting, and SPA cleanup.