Hey everyone! It feels like with all the UI frameworks out there, nobody's really building vanilla ES6 tools anymore. I have an application with a massive configuration object that needs a form, and I'm not keen on adding a framework just for this small task due to performance and maintenance issues. I've searched high and low on GitHub, but it feels like finding a needle in a haystack! If anyone has any recommendations for a good vanilla ES6 library that can generate forms from JSON, I'd really appreciate your help. Thanks a bunch!
5 Answers
Right? The whole "needle in a haystack overflow" is real! It feels like everyone just opts to `npm install -form-generator` these days. Keep searching; I hope you find that perfect solution!
I totally relate to your struggle! A few years back, I searched for something similar to generate forms from large config objects and didn't have much luck. I really looked for features like extensibility for complex validations, active maintainers, and good documentation. Unfortunately, I never found anything worthwhile. Nowadays, I just use Angular's reactive forms—they're quite nice but I know that's not what you're looking for.
I actually created a library for this purpose that works with JSON schema! It's called Jedison and even though it doesn't have many stars yet, it's been used in production for government projects at my company. It has plenty of unit and end-to-end tests too. Check it out on GitHub!
Nice, I love that it includes a color picker! Great work!
Honestly, this is why UI frameworks became so popular. You pretty much need to create a UI input element for every JSON object in your configuration. If you look at the vanilla code generated by JSX parsers, it's just a series of `document.createElement()` calls. JSX just simplifies that process!
Why complicate things with a library? You can just use `forEach` along with `createElement`. It could be as simple as a switch-case for each type of input you need.

Oh man, this looks awesome! I just starred your repo; it’s exactly what I’ve been looking for!