Skip to content

@neutro/form

Zero-dependency reactive form engine for every framework.

Why @neutro/form?

Most form libraries are coupled to a single framework or require a large runtime. @neutro/form ships a single closure factory — createForm<T> — that manages all form state internally. Framework adapters are thin reactive wrappers around the same engine, so you get identical validation behaviour, array operations, and DOM bridge semantics regardless of which UI framework you use.

ts
import { createForm } from '@neutro/form/core'

const form = createForm({
  initialValues: { email: '', password: '' },
  validator: (values) => {
    const errors: Record<string, string> = {}
    if (!values.email) errors.email = 'Required'
    if (values.password.length < 8) errors.password = 'Min 8 characters'
    return errors
  },
})

Get Started | API Reference | Playground


Neutro Ecosystem

@neutro/form is part of the Neutro collection — focused, zero-dependency primitives for the web.

  • @neutro/form — the library you're reading about now
  • @neutro/fluid (coming soon) — a physics-grounded glass material system for the web

Support the Project

If this library saves you time, consider buying me a coffee. It keeps the packages maintained and the documentation up to date.

Found a bug or have a feature request? Open an issue on GitHub — see the Community page for guidelines.