Elegant React forms,
with or without the boilerplate.
Generate a complete, validated form from a schema with AutoForm — or take full control with the useForm hook. Bring Zod, Yup, Valibot, a custom validator, or none.
import { AutoForm } from "el-form-react-components"; import "el-form-react-components/styles.css"; import { z } from "zod"; const contactSchema = z.object({ name: z.string().min(1, "Name is required"), email: z.string().email("Invalid email"), message: z.string().min(10, "Message too short"), }); function ContactForm() { return <AutoForm schema={contactSchema} onSubmit={handle} />; }
Start from a schema. Drop down to the hook when you need the wheel.
One line gets you a complete form. When a flow demands bespoke logic, the same library hands you full programmatic control — no migration, no rewrite.
Pass a schema; get a complete, validated, styled form. Fields, errors, and submit wiring are generated for you.
import { AutoForm } from "el-form-react-components"; import "el-form-react-components/styles.css"; import { z } from "zod"; const contactSchema = z.object({ name: z.string().min(1, "Name is required"), email: z.string().email("Invalid email"), message: z.string().min(10, "Message too short"), }); function ContactForm() { return ( <AutoForm schema={contactSchema} onSubmit={(data) => console.log(data)} /> ); }
A React Hook Form-compatible hook. Register fields, own your markup, and handle submission exactly how you like.
import { useForm } from "el-form-react-hooks"; function CustomForm() { const { register, handleSubmit, formState } = useForm({ defaultValues: { email: "", message: "" }, }); return ( <form onSubmit={handleSubmit((data) => console.log(data))}> <input {...register("email")} placeholder="Email" /> <textarea {...register("message")} placeholder="Message" /> <button type="submit">Submit</button> </form> ); }
Bring your own validation.
Swap validators without rewriting the form. The schema is an input, not a lock-in — start with Zod today, move to Valibot tomorrow, drop validation entirely for a prototype.
One form component. schema in, validated data out — whatever the source.
Built for developers who want control and convenience.
Type-safe inference
Field names, values, and errors are inferred from your schema. The compiler catches typos before your users do.
Minimal re-renders
State is isolated per field, so typing in one input doesn't re-render the whole form. Fast by default, even at scale.
Styled out of the box
AutoForm ships clean, accessible defaults you can theme — or override entirely. Beautiful before you touch the CSS.
RHF-compatible API
useForm mirrors React Hook Form's surface — register, handleSubmit, formState. Migrate with muscle memory intact.
Modular packages
Install only the layer you need — hooks, components, or both. No mandatory UI bundle riding along for the trip.
Framework-friendly
Works with Next.js, Vite, Remix, and CRA. React 16.8 and up — wherever your app already lives, El Form fits.
From schema to form in one line.
Install the package, point AutoForm at a schema, and you have a validated form. Reach for the hook the moment you need the wheel.
