pgForm/Overview
pgForm · v0.2.1 · Stable

The BYOC
form library
for React.

A schema-typed form store with per-field reactive subscriptions. Bring your own input components — pgForm owns the state, validation, formatters, and submission lifecycle.

Per-field subscriptions0re-rendersA field only re-renders when its own slice changes. No context. No selectors.
$bun add @westopp/pgform
Requires React 19+
State you don't manage
immer-backed store · survives unmount
Values, errors, touched, dirty, focused, disabled, hidden — all in one store.
No useState rows. No reducers. No context.
Restore the form when the component remounts.
How it works
Bring your own components
text · select · array · group · custom
pgForm provides the store, validation, formatters, submission.
You provide the inputs — typed props handed to your components.
No mandatory design system, no styling lock-in.
01

Reactive per field

A field re-renders only when its own value, error, or dynamic prop changes. Zero ceremony, zero memo gymnastics.

Reactivity →
02

Dynamic everything

Required, disabled, hidden, options, validators — any prop can be a function of the form. Dependencies are tracked, not declared.

Dynamic props →
03

Arrays and groups

First-class array fields with add / remove / move handlers. Nested groups with single-level dotted keys.

Arrays & groups →

Ship a real form in 10 minutes

A walkthrough with validation, formatters, dynamic props, and submission.

Start the tutorial