Javascript Widget Form

I am trying to create a widget form for client where their users’s can embed a form widget. Any tips on resources? I don’t want to reinvent the wheel, if there are gems out there that does that already. Any tips will be appreciated!