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

PropDefaultDescription
schemaForm schema (required)
theme"modern"modern | minimal | enterprise
autoLayouttrueAuto responsive 2-column grid
responsivetrueCollapse to 1 column on mobile
submitLabel"Submit"Submit button text
showSubmittrueShow/hide submit button
defaultValues{}Initial field values
onSubmitCalled with values when valid
onErrorCalled 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" />