{"id":16788743,"url":"https://github.com/markmead/alpinejs-form-captcha","last_synced_at":"2025-11-03T14:30:32.945Z","repository":{"id":45781688,"uuid":"514549922","full_name":"markmead/alpinejs-form-captcha","owner":"markmead","description":"Prevent your forms getting unwanted submissions through the use of an image puzzle ✅","archived":false,"fork":false,"pushed_at":"2024-04-04T11:01:23.000Z","size":23,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-03T10:03:15.978Z","etag":null,"topics":["alpine-js","alpinejs","alpinejs-plugin","captcha","form-captcha","form-validation","javascript-captcha","javascript-validation","validation"],"latest_commit_sha":null,"homepage":"https://js.hyperui.dev/examples/form-captcha","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/markmead.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}},"created_at":"2022-07-16T10:45:12.000Z","updated_at":"2024-06-04T23:22:20.000Z","dependencies_parsed_at":"2024-04-04T12:25:47.529Z","dependency_job_id":"7db28cb6-dd85-419f-92c5-36a31d44adb1","html_url":"https://github.com/markmead/alpinejs-form-captcha","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/markmead%2Falpinejs-form-captcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-form-captcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-form-captcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-form-captcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markmead","download_url":"https://codeload.github.com/markmead/alpinejs-form-captcha/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239417425,"owners_count":19635131,"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":["alpine-js","alpinejs","alpinejs-plugin","captcha","form-captcha","form-validation","javascript-captcha","javascript-validation","validation"],"created_at":"2024-10-13T08:24:35.896Z","updated_at":"2025-11-03T14:30:32.915Z","avatar_url":"https://github.com/markmead.png","language":"JavaScript","readme":"# Alpine JS Form Captcha\n\nPrevent your forms getting unwanted submissions through the use of an image\npuzzle ✅\n\n### [Try it out on CodePen](https://codepen.io/markmead/full/abYpZbj)\n\n## Example\n\n```html\n\u003cform x-data\u003e\n  \u003cinput type=\"text\" placeholder=\"Name\" /\u003e\n\n  \u003cdiv\n    x-form-captcha\n    x-form-captcha-img=\"https://images.unsplash.com/photo-1598894000396-bc30e0996899?ixlib=rb-4.0.3\u0026ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8\u0026auto=format\u0026fit=crop\u0026w=400\u0026q=80\"\n  \u003e\u003c/div\u003e\n\n  \u003cbutton type=\"submit\"\u003e Submit \u003c/button\u003e\n\u003c/form\u003e\n```\n\n### Bot Prevention\n\nThere is logic in place to stop one click answers, meaning there shouldn't be a\ntime where the answer is one click away.\n\n### Styling\n\nIn the `x-form-captcha-img` is where you can pass the URL for the image you want\ndisplayed.\n\nThe HTML that is generated hsa the following classes:\n\n- `fvWrapper`\n- `fvImg`\n- `fvActions`\n- `fvPrev`\n- `fvNext`\n\n### Modifiers\n\nYou can pass a rotation degrees with `x-form-captcha.30` where `30` is the\ndegrees you want.\n\n## Install\n\nIt's very easy to install Alpine JS plugins! 🙌\n\n### CDN\n\n```html\n\u003cscript\n  defer\n  src=\"https://unpkg.com/alpinejs-form-captcha@latest/dist/captcha.min.js\"\n\u003e\u003c/script\u003e\n\n\u003cscript defer src=\"https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js\"\u003e\u003c/script\u003e\n```\n\n### NPM/Yarn\n\n```shell\nnpm i -D alpinejs-form-captcha\n\nyarn add -D alpinejs-form-captcha\n```\n\nThen you can register the plugin.\n\n```js\nimport Alpine from 'alpinejs'\nimport captcha from 'alpinejs-form-captcha'\n\nAlpine.plugin(captcha)\n\nwindow.Alpine = Alpine\n\nAlpine.start()\n```\n\n### Stats\n\n![](https://img.shields.io/bundlephobia/min/alpinejs-form-captcha)\n![](https://img.shields.io/npm/v/alpinejs-form-captcha)\n![](https://img.shields.io/npm/dt/alpinejs-form-captcha)\n![](https://img.shields.io/github/license/markmead/alpinejs-form-captcha)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmead%2Falpinejs-form-captcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkmead%2Falpinejs-form-captcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmead%2Falpinejs-form-captcha/lists"}