{"id":13787280,"url":"https://github.com/tiaanduplessis/formik-error-focus","last_synced_at":"2025-08-08T01:42:56.647Z","repository":{"id":49584473,"uuid":"192549893","full_name":"tiaanduplessis/formik-error-focus","owner":"tiaanduplessis","description":"Scroll to the first error in your Formik form and set focus","archived":false,"fork":false,"pushed_at":"2022-05-22T01:26:56.000Z","size":230,"stargazers_count":9,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T22:40:57.240Z","etag":null,"topics":["error","focus","formik","scroll-to"],"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/tiaanduplessis.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}},"created_at":"2019-06-18T13:52:43.000Z","updated_at":"2022-12-19T08:07:26.000Z","dependencies_parsed_at":"2022-08-29T22:21:34.467Z","dependency_job_id":null,"html_url":"https://github.com/tiaanduplessis/formik-error-focus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tiaanduplessis/formik-error-focus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fformik-error-focus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fformik-error-focus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fformik-error-focus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fformik-error-focus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiaanduplessis","download_url":"https://codeload.github.com/tiaanduplessis/formik-error-focus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fformik-error-focus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269352290,"owners_count":24402672,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["error","focus","formik","scroll-to"],"created_at":"2024-08-03T20:00:32.404Z","updated_at":"2025-08-08T01:42:56.577Z","avatar_url":"https://github.com/tiaanduplessis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# formik-error-focus\n\n[![package version](https://img.shields.io/npm/v/formik-error-focus.svg?style=flat-square)](https://npmjs.org/package/formik-error-focus)\n[![package downloads](https://img.shields.io/npm/dm/formik-error-focus.svg?style=flat-square)](https://npmjs.org/package/formik-error-focus)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![package license](https://img.shields.io/npm/l/formik-error-focus.svg?style=flat-square)](https://npmjs.org/package/formik-error-focus)\n[![make a pull request](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\nScroll to the first error in your Formik form and set focus\n\n## Table of Contents\n\n- [formik-error-focus](#formik-error-focus)\n  - [Table of Contents](#table-of-contents)\n  - [👀 Background](#-background)\n  - [⚙️ Install](#️-install)\n  - [📖 Usage](#-usage)\n  - [📚 API](#-api)\n  - [💬 Contributing](#-contributing)\n  - [🪪 License](#-license)\n\n## 👀 Background\n\nWrapper around [scroll-to-element](https://www.npmjs.com/package/scroll-to-element) that scrolls to the first error element in Formik.\n\n## ⚙️ Install\n\nInstall the package locally within you project folder with your package manager:\n\nWith `npm`:\n\n```sh\nnpm install formik-error-focus\n```\n\nWith `yarn`:\n\n```sh\nyarn add formik-error-focus\n```\n\nWith `pnpm`:\n\n```sh\npnpm add formik-error-focus\n```\n\n## 📖 Usage\n\n```js\nimport React from \"react\";\nimport { Formik, Field, Form } from \"formik\";\nimport FormikErrorFocus from \"formik-error-focus\";\n\nexport const Signup = () =\u003e (\n  \u003cdiv\u003e\n    \u003ch1\u003eMy Uncool Persisted Form\u003c/h1\u003e\n    \u003cFormik\n      onSubmit={(values) =\u003e console.log(values)}\n      initialValues={{ firstName: \"\", lastName: \"\", email: \"\" }}\n      render={(props) =\u003e (\n        \u003cForm className=\"whatever\"\u003e\n          \u003cField name=\"firstName\" placeholder=\"First Name\" /\u003e\n          \u003cField name=\"lastName\" placeholder=\"Last Name\" /\u003e\n          \u003cField name=\"email\" type=\"email\" placeholder=\"Email Address\" /\u003e\n          \u003cbutton type=\"submit\"\u003eSubmit\u003c/button\u003e\n          \u003cFormikErrorFocus\n            // See scroll-to-element for configuration options: https://www.npmjs.com/package/scroll-to-element\n            offset={0}\n            align={\"top\"}\n            focusDelay={200}\n            ease={\"linear\"}\n            duration={1000}\n          /\u003e\n        \u003c/Form\u003e\n      )}\n    /\u003e\n  \u003c/div\u003e\n);\n```\n\n## 📚 API\n\nFor all configuration options, please see the [API docs](https://paka.dev/npm/formik-error-focus).\n\n## 💬 Contributing\n\nGot an idea for a new feature? Found a bug? Contributions are welcome! Please [open up an issue](https://github.com/tiaanduplessis/formik-error-focus/issues) or [make a pull request](https://makeapullrequest.com/).\n\n## 🪪 License\n\n[MIT © Tiaan du Plessis](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiaanduplessis%2Fformik-error-focus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiaanduplessis%2Fformik-error-focus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiaanduplessis%2Fformik-error-focus/lists"}