{"id":20197030,"url":"https://github.com/itsjonq/formit","last_synced_at":"2026-06-07T03:31:37.408Z","repository":{"id":146984527,"uuid":"133270997","full_name":"ItsJonQ/formit","owner":"ItsJonQ","description":"🐇Formit: A speedy way to create HTML forms.","archived":false,"fork":false,"pushed_at":"2018-05-14T02:04:15.000Z","size":175,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T19:41:24.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ItsJonQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-13T20:14:19.000Z","updated_at":"2018-05-24T16:22:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"e223a49a-54d8-4ac9-8b5e-3760ea008296","html_url":"https://github.com/ItsJonQ/formit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJonQ%2Fformit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJonQ%2Fformit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJonQ%2Fformit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJonQ%2Fformit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItsJonQ","download_url":"https://codeload.github.com/ItsJonQ/formit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241629769,"owners_count":19993710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T04:27:00.799Z","updated_at":"2025-12-01T14:07:25.710Z","avatar_url":"https://github.com/ItsJonQ.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐇 Formit\n\n\u003e A speedy way to create HTML forms.\n\n* ⚡️ **Tiny**, around 1.35 KB gzipped\n* 🙌 **Zero dependences**\n* 🖌 **Styleless** by design, allowing you to add your own.\n\n\n**[Check out the demo](http://formit.surge.sh/)**\n\n## 🔧 Installation\n\n```\nnpm install --save formit\n```\n\nThen, import it into your Javascript workflow:\n\n```js\nimport Formit from 'formit'\n```\n\nThe UMD build is also available via [unpkg](https://unpkg.com):\n\n```html\n\u003cscript src=\"https://unpkg.com/form/dist/index.umd.js\"\u003e\u003c/script\u003e\n```\n\n\n## 🕹 Usage\n\nHere's a quick example of how you can compose HTML forms with Formit:\n\n#### 1. Prepare the HTML\n\nCreate somewhere for your Formit elements to render to:\n\n```html\n\u003cform\u003e\n  \u003cdiv id=\"Form\"\u003e\u003c/div\u003e\n\u003c/form\u003e\n```\n\n#### 2. Generate with Formit\n\nTarget your selector, and pass in the Formit elements you want to generate:\n\n```js\nFormit('#form', [\n  {\n    label: 'First name',\n    type: 'text',\n    placeholder: 'First',\n    autofocus: true,\n  },\n  {\n    label: 'Last name',\n    placeholder: 'Last',\n    type: 'text',\n  },\n  {\n    type: 'submit',\n    value: 'Go!'\n  },\n])\n```\n\n#### 3. Check out your rendered form\n\nAw yea! Your selector is now populated with ready-to-use form elements.\n\nA cool feature of Formit is that it'll automatically generate unique IDs and associate the `\u003clabel\u003e` (if generated) with the field.\n\n```html\n\u003cdiv id=\"form\"\u003e\n  \u003cdiv class=\"FormElements-FieldGroup FormElements-id-0\"\u003e\n    \u003clabel for=\"FormElements-0\" class=\"FormElements-Label\"\u003e\n      \u003cdiv class=\"FormElements-Label__text\"\u003eFirst name\u003c/div\u003e\n      \u003cinput type=\"text\" id=\"FormElements-0\" placeholder=\"First\" autofocus=\"true\" class=\"FormElements-Field\"\u003e\n    \u003c/label\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"FormElements-FieldGroup FormElements-id-1\"\u003e\n    \u003clabel for=\"FormElements-1\" class=\"FormElements-Label\"\u003e\n    \u003cdiv class=\"FormElements-Label__text\"\u003eLast name\u003c/div\u003e\n    \u003cinput type=\"text\" id=\"FormElements-1\" placeholder=\"Last\" class=\"FormElements-Field\"\u003e\n    \u003c/label\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"FormElements-FieldGroup FormElements-id-2\"\u003e\n    \u003cinput type=\"submit\" id=\"FormElements-2\" value=\"Go!\" class=\"FormElements-Field\"\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n\n## 📒 Notes\n\nTests and additional docs coming soon!\n\n\n## ❤️  Thanks\n\nA big thanks to [developit](https://github.com/developit) for his amazing tools and for being a source of inspiration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsjonq%2Fformit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsjonq%2Fformit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsjonq%2Fformit/lists"}