{"id":16796965,"url":"https://github.com/johnrom/formik-typed","last_synced_at":"2026-04-02T14:58:54.252Z","repository":{"id":57240562,"uuid":"175300754","full_name":"johnrom/formik-typed","owner":"johnrom","description":"A Wrapper for Formik that exposes Strongly Typed Fields","archived":false,"fork":false,"pushed_at":"2025-02-13T02:11:00.000Z","size":938,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T22:23:45.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/johnrom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-12T21:43:33.000Z","updated_at":"2021-07-22T16:27:53.000Z","dependencies_parsed_at":"2022-08-30T00:11:51.996Z","dependency_job_id":null,"html_url":"https://github.com/johnrom/formik-typed","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/johnrom%2Fformik-typed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fformik-typed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fformik-typed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fformik-typed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnrom","download_url":"https://codeload.github.com/johnrom/formik-typed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312093,"owners_count":20918344,"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-10-13T09:20:42.620Z","updated_at":"2026-04-02T14:58:54.222Z","avatar_url":"https://github.com/johnrom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e Note: Does not work in IE11 or anywhere Proxy is not supported! I'm not actively maintaining this project as I need IE11 support at the moment.\n\n\u003e This is based on Formik v1, so there are no examples with hooks.\n\nA proof of concept. Making forms less verbose in [React](https://github.com/facebook/react) shouldn't cause you to lose your [TypeScript](https://typescriptlang.org) typings. This package provides a wrapper for [Formik](https://github.com/jaredpalmer/formik/) that will strongly type your field and auto-populate its name based on your Formik `FormValues` shape.\n\nStatus: **pre-Alpha**\n\nBefore use, check out the [Formik Docs](https://jaredpalmer.com/formik/docs/overview).\n\n## In-browser Playgrounds\n\n[CodeSandbox](https://codesandbox.io/s/formik-typed-fzge9)\n\n## Examples\n\nSee all examples here: https://github.com/johnrom/formik-typed/tree/master/examples\n\nOr check out the [CodeSandbox](https://codesandbox.io/s/formik-typed-fzge9).\n\n### Using Fields\n\n```tsx\nexport interface SignupFormValues {\n  title: string;\n  name: string;\n  age?: number;\n  emergencyContacts: EmergencyContact[];\n}\n\nexport const SignupForm: React.FC\u003c\n  TypedFormikProps\u003cSignupFormValues\u003e\n\u003e = props =\u003e {\n  const TitleField = props.fields.title._getField();\n  const NameField = props.fields.name._getField();\n\n  return (\n    \u003cdiv\u003e\n      \u003ch1\u003eSignup\u003c/h1\u003e\n      \u003cForm\u003e\n        \u003cp\u003e\n          {/* Writing a Field definition inline is dead simple.  */}\n          \u003cTitleField\u003e\n            {titleProps =\u003e (\n              \u003c\u003e\n                \u003clabel htmlFor={titleProps.field.name}\u003eTitle\u003c/label\u003e\n                \u003cselect\n                  name={titleProps.field.name}\n                  value={titleProps.field.value}\n                  onChange={titleProps.field.onChange}\n                \u003e\n                  \u003coption value=\"\"\u003eSelect a Title (optional)\u003c/option\u003e\n                  \u003coption value=\"Mr.\"\u003eMr.\u003c/option\u003e\n                  \u003coption value=\"Mrs.\"\u003eMrs.\u003c/option\u003e\n                \u003c/select\u003e\n              \u003c/\u003e\n            )}\n          \u003c/TitleField\u003e\n        \u003c/p\u003e\n        \u003cp\u003e\n          \u003cNameField\u003e\n            {nameProps =\u003e (\n              \u003c\u003e\n                \u003clabel htmlFor={nameProps.field.name}\u003eName\u003c/label\u003e\n                \u003cinput\n                  name={nameProps.field.name}\n                  value={nameProps.field.value}\n                  onChange={nameProps.field.onChange}\n                  placeholder=\"John\"\n                /\u003e\n              \u003c/\u003e\n            )}\n          \u003c/NameField\u003e\n        \u003c/p\u003e\n        {/* Passing your own Custom Component to a Field definition is also pretty easy.\n         */}\n        \u003cAgeField field={props.fields.age._getField()} min={21} /\u003e\n        {/* For Custom Components that need to manage multiple fields, you can pass the proxy directly */}\n        \u003cEmergencyContactsField fields={props.fields} /\u003e\n        \u003cbutton type=\"submit\"\u003eSubmit\u003c/button\u003e\n      \u003c/Form\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\n---\n\nShoutout to Jared Palmer for his work on Formik.\n\n---\n\nMIT License.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnrom%2Fformik-typed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnrom%2Fformik-typed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnrom%2Fformik-typed/lists"}