Quick Start
Get a form running in under 2 minutes.
Install
npm install @formforges/react @formforges/core
Define a schema
const schema = {
name: { type: 'text', label: 'Full Name', required: true },
email: { type: 'email', label: 'Email', required: true },
message: { type: 'textarea', label: 'Message' },
}Render the form
import { FormForge } from '@formforges/react'
export function ContactForm() {
return (
<FormForge
schema={schema}
onSubmit={async (values) => {
console.log(values)
}}
/>
)
}That's it. FormForge handles layout, validation, accessibility, and state automatically.
Options
| Prop | Default | Description |
|---|---|---|
schema | — | Form schema (required) |
theme | "modern" | modern | minimal | enterprise |
autoLayout | true | Auto responsive 2-column grid |
responsive | true | Collapse to 1 column on mobile |
submitLabel | "Submit" | Submit button text |
showSubmit | true | Show/hide submit button |
defaultValues | {} | Initial field values |
onSubmit | — | Called with values when valid |
onError | — | Called with errors when invalid |
With default values
<FormForge
schema={schema}
defaultValues={{ name: 'Alice', email: 'alice@example.com' }}
onSubmit={async (values) => console.log(values)}
/>Theme variants
<FormForge schema={schema} theme="modern" />
<FormForge schema={schema} theme="minimal" />
<FormForge schema={schema} theme="enterprise" />