{"id":15295877,"url":"https://github.com/tchaumeny/formik-schema","last_synced_at":"2025-02-23T22:32:47.908Z","repository":{"id":57240552,"uuid":"106742732","full_name":"tchaumeny/formik-schema","owner":"tchaumeny","description":"Just build forms.","archived":false,"fork":false,"pushed_at":"2023-02-01T19:25:11.000Z","size":107,"stargazers_count":33,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-01T18:08:27.100Z","etag":null,"topics":["bootstrap","bootstrap4","form","javascript","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tchaumeny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-12T20:37:19.000Z","updated_at":"2023-02-01T19:25:14.000Z","dependencies_parsed_at":"2023-02-17T09:50:22.618Z","dependency_job_id":null,"html_url":"https://github.com/tchaumeny/formik-schema","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchaumeny%2Fformik-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchaumeny%2Fformik-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchaumeny%2Fformik-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchaumeny%2Fformik-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tchaumeny","download_url":"https://codeload.github.com/tchaumeny/formik-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219845836,"owners_count":16556441,"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":["bootstrap","bootstrap4","form","javascript","react"],"created_at":"2024-09-30T18:08:29.182Z","updated_at":"2024-10-15T01:04:44.644Z","avatar_url":"https://github.com/tchaumeny.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### ⚠ This project has been abandoned, use at your own risk ⚠\n\n# formik-schema\n\nCreate forms simply using [React](https://reactjs.org/).\n\n```js\nimport { Form } from 'formik-schema';\n\nReactDOM.render(\n  \u003cForm\n    schema={{\n      fields: [\n        { name: \"email\", title: \"Email\", type: \"email\" },\n        { name: \"date\", title: \"Chose a date\", type: \"date\" },\n        { name: \"accept\", title: \"Conditions\", type: \"checkbox\", description: \"I accept everything.\" }\n      ]\n    }}\n    initialValues={{ accept: true }}\n    onSubmit={(values) =\u003e {console.log(values)}}\n  /\u003e,\n  document.getElementById('root')\n);\n```\n\nBuilt-in support for [Bootstrap 4](https://getbootstrap.com/), multiple widgets available, highly customizable renderers.\n\n### ➡ [Live demo](https://codesandbox.io/s/github/tchaumeny/formik-schema/tree/master/demo)\n\n## Installation\n\n    npm install formik-schema --save\n\n## Testing\n\nThis library comes with a few basic tests, using [Jest](http://facebook.github.io/jest/):\n\n    npm test\n\nThis will actually build the bundle and run a few snapshot tests against it.\n\n## Custom widgets\n\nYou can register your own widgets (or override existing ones) simply:\n\n```js\nimport { registerWidget } from 'formik-schema';\n\nregisterWidget('textarea', (config, params) =\u003e (\n  \u003cMyTextarea name={config.name} onChange={params.handleChange} id={config.name} value={params.values[config.name]} rows={config.rows || 3} /\u003e\n));\n```\n\n## Custom form renderers\n\nBy default, forms are rendered as Bootstrap 4 vertical forms (see \u003chttps://getbootstrap.com/docs/4.0/components/forms/#horizontal-form\u003e). You can also register your own renderer, e.g.:\n\n```js\nimport { makeWidget, registerRenderer } from 'formik-schema';\n\nregisterRenderer('table-form',\n  (schema) =\u003e (params) =\u003e (\n    \u003cform onSubmit={params.handleSubmit}\u003e\n      \u003ctable\u003e\n      {schema.fields.map((field) =\u003e (\n        \u003ctr\u003e\n          \u003ctd\u003e{field.title}\u003c/td\u003e\n          \u003ctd\u003e{makeWidget(field, params)}\u003c/td\u003e\n        \u003c/tr\u003e\n      ))}\n      \u003c/table\u003e\n      \u003cbutton type=\"submit\"\u003eOK\u003c/button\u003e\n    \u003c/form\u003e\n  )\n);\n```\n\n## Note\n\nUnder the hood, this library uses [Formik](https://github.com/jaredpalmer/formik) to handle form state and submission.\nThe variable `params` appearing in the code samples is documented in Formik (see https://github.com/jaredpalmer/formik#the-gist).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchaumeny%2Fformik-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftchaumeny%2Fformik-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchaumeny%2Fformik-schema/lists"}