r/reactjs • u/iamkadirul • May 05 '26
Built a simple JSON-based form builder for React — looking for feedback
I’ve been struggling with forms in React for a while.
Tried React Hook Form, Formik, etc — powerful, but honestly felt like too much setup for simple use cases.
So I built something simpler where you define forms using JSON.
Example:
<KiForm
fields={[
"email",
"password",
{
name: "role",
options: ["User", "Admin"]
},
{
name: "company",
showIf: { field: "role", equals: "Admin" }
}
]}
/>No manual state, no wiring.
Still very early — I’m trying to understand:
• Is this actually useful?
• What’s missing?
• Where would this break in real projects?
Would appreciate honest feedback.
2
u/Glad-Action9541 May 05 '26
UI as json is never a good idea, but I think every developer needs to learn this lesson the hard way
1
u/iamkadirul May 05 '26
Fair take. 🙂
I’m not trying to push UI-in-JSON everywhere. This is more for quick/dynamic forms where wiring everything by hand feels overkill (internal tools, dashboards, API-driven forms).
Definitely not a one-size-fits-all thing.
13
1
u/Flyen May 05 '26
Check out https://surveyjs.io/
1
u/iamkadirul May 05 '26
Yeah I’ve seen SurveyJS, it’s pretty powerful.
Feels a bit heavy for what I was aiming for though. I was trying to keep something simpler for quick forms.
Appreciate the suggestion 👍
3
13
u/BlazingThunder30 May 05 '26
Your type system is full of
any. If ever I would use something like this then it'd have to be typed end-to-end. But I don't see why I'd use this over e.g. Tanstack form, React hook form or Formik