Skip to main content

Introduction

Raven Form Engine is a schema-driven, adapter-based React form engine that lets you build complex forms without committing to a specific UI component library or form-state management library.

Core Philosophy​

The engine is split into three independent layers:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Your Application β”‚
β”‚ β”‚
β”‚ <RavenForm schema={...} onSubmit={...} /> β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Schema β”‚ β”‚ FormAdapterβ”‚ β”‚ UIAdapter β”‚
β”‚ (JSON) β”‚ β”‚ (RHF, β”‚ β”‚ (ShadCN, β”‚
β”‚ β”‚ β”‚ Formik, β”‚ β”‚ AntD, β”‚
β”‚ β”‚ β”‚ Zustand) β”‚ β”‚ MUI, …) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
LayerResponsibility
SchemaDeclarative field definitions β€” type, label, validation, visibility, layout
FormAdapterManages form state (dirty, touched, errors, submission)
UIAdapterMaps field types to actual UI components

Key Features​

  • πŸ—οΈ Schema-driven β€” define your entire form as a plain JS/JSON object
  • πŸ”Œ Adapter-based β€” swap UI libs and state libs without changing your form schema
  • πŸͺœ Wizard forms β€” built-in multi-step forms with step validation
  • πŸ” Repeater fields β€” dynamic rows of sub-fields
  • 🎭 Conditional fields β€” hidden and disabled can be functions of form values
  • βœ… Validation β€” sync and async validators, with React Hook Form support
  • 🎭 Masking β€” composable mask pipeline
  • πŸ›  DevTools β€” floating panel with live form state inspection

Architecture Diagram​

RavenFormProvider
β”œβ”€β”€ UIAdapterContext β†’ provides UIAdapter to all children
β”œβ”€β”€ FormAdapterContext β†’ provides FormAdapter to all children
└── RavenAdapterRegistry β†’ optional multi-adapter registry

RavenForm
β”œβ”€β”€ FormAdapter.Provider β†’ initialises form state
β”‚ β”œβ”€β”€ RavenField β†’ field.type β†’ UIAdapter.components[type]
β”‚ β”œβ”€β”€ RavenField
β”‚ └── ...
└── Submit / Reset buttons

RavenWizardForm
β”œβ”€β”€ FormAdapter.Provider β†’ single state across all steps
β”‚ β”œβ”€β”€ Step 1..N
β”‚ β”‚ └── RavenField[]
β”‚ └── Progress bar + Prev/Next navigation
└── Submit button (last step only)

What's Included​

  • RavenForm β€” single-page form
  • RavenWizardForm β€” multi-step wizard form
  • RavenRepeaterField β€” dynamic repeating field groups
  • RavenFormProvider / RavenDevToolsProvider β€” app-level adapter injection
  • Built-in adapters: React Hook Form, ShadCN UI, Ant Design
  • Utilities: createUIAdapter, createFormAdapter, mask engine, validators

πŸš€ See It In Action​

The Advanced Demo page shows full real-world scenarios β€” a 5-step wizard, conditional fields, cross-field validation, and repeater line items β€” all with live DevTools:

πŸš€Β  Open Advanced Demo