Change the JSON.
The form changes.

A headless React form engine. Conditional fields, validation, calculated values and repeaters live in a schema your backend controls — so changing a form stops being a frontend ticket.

npm install driven-form
What your backend sends
{  "id": "hero",  "fields": [    {      "name": "hasCompany",      "type": "radio",      "label": "Do you represent a company?",      "order": 1,      "options": [        {          "id": "Yes",          "label": "Yes"        },        {          "id": "No",          "label": "No"        }      ]    },    {      "name": "companyName",      "type": "text",      "label": "Company name",      "placeholder": "Acme Ltd",      "order": 2,      "show": "%hasCompany% == 'Yes'"    }  ]}
What people see
Change the schema

Why this exists

This is the entire ticket.

FE-2291 · In progress

Hide company field for individual users

Estimate
3 story points
Needs
Frontend PR, review, QA pass
Blocked by
Next release train
Assignee
Someone's whole Tuesday
+   "show": "%hasCompany% == 'Yes'",
+   "required": "%hasCompany% == 'Yes'"

Shipped. No frontend PR. No deploy. A backend config change.

The contract

The library owns logic. You own every pixel.

driven-form handles

  • Which fields show, are required, or are disabled
  • Values derived from other values
  • Validation, sync and async
  • Array fields with per-row scope
  • When each component re-renders

You handle

  • What an input looks like

That's the whole list. The engine ships no UI — aTextInput you write on day one never needs touching again, no matter how the form changes.

Performance

A field re-renders only when it has to.

Its own value, its own error, or a dependency it declared. Nothing else. That's enforced by tests in the repo — and you can watch it happen: the playground's Renders tab counts every field's renders live.

FieldRenders after editing qty
qty2
subtotal2
discount2
taxable2
total2
price1

Four levels of calculated fields settle in one pass. price was never touched, so it never rendered again.Try it yourself.

Write your inputs once.

Then change forms from wherever your schema comes from — a backend, a CMS, a PM with a JSON editor, a model that emits JSON.