{"id":21347899,"url":"https://github.com/amiryxe/credit-card-input","last_synced_at":"2026-03-08T16:33:32.337Z","repository":{"id":46226785,"uuid":"407777047","full_name":"amiryxe/credit-card-input","owner":"amiryxe","description":"Credit card input with multiple fields","archived":false,"fork":false,"pushed_at":"2022-10-05T14:13:35.000Z","size":31,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T23:11:18.530Z","etag":null,"topics":["credit-card","fields","input","javascript","jquery"],"latest_commit_sha":null,"homepage":"https://amiryxe.github.io/credit-card-input/","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/amiryxe.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":"2021-09-18T06:30:10.000Z","updated_at":"2022-09-03T05:13:44.000Z","dependencies_parsed_at":"2023-01-19T06:45:49.651Z","dependency_job_id":null,"html_url":"https://github.com/amiryxe/credit-card-input","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/amiryxe/credit-card-input","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiryxe%2Fcredit-card-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiryxe%2Fcredit-card-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiryxe%2Fcredit-card-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiryxe%2Fcredit-card-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amiryxe","download_url":"https://codeload.github.com/amiryxe/credit-card-input/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiryxe%2Fcredit-card-input/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265025539,"owners_count":23699768,"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":["credit-card","fields","input","javascript","jquery"],"created_at":"2024-11-22T02:17:03.745Z","updated_at":"2026-03-08T16:33:32.308Z","avatar_url":"https://github.com/amiryxe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Credit card input\n\nVanilla JS credit card form with multiple fields.\n\n## [DEMO](https://amiryxe.github.io/credit-card-input/)\n\nYou can also see the demo on the [Codepen](https://codepen.io/amiryxe/pen/QWgQPEa)\n\n## Features\n- Automatically focuses the next field\n- Only accepts numbers\n- Holds the main input\n- Copy to clipboard\n\n## How to use\n\nInclude the style file:\n\n```css\n\u003clink rel=\"stylesheet\" href=\"./css/credit-card-input.css\"\u003e\n```\n\nInclude the js file:\n\n```js\n\u003cscript src=\"./js/credit-card-input.js\"\u003e\u003c/script\u003e\n```\n\nUse this HTML structure to initial credit inputs:\n\n```html\n\u003cdiv class=\"credit-card-inputs\"\u003e\n  \u003cdiv class=\"credit-card-inputs__fields\"\u003e\n    \u003cinput type=\"text\" data-pos=\"1\" placeholder=\"xxxx\" /\u003e\n    \u003cinput type=\"text\" data-pos=\"2\" placeholder=\"xxxx\" /\u003e\n    \u003cinput type=\"text\" data-pos=\"3\" placeholder=\"xxxx\" /\u003e\n    \u003cinput type=\"text\" data-pos=\"4\" placeholder=\"xxxx\" /\u003e\n  \u003c/div\u003e\n  \u003cbutton class=\"credit-card-inputs__reset\"\u003eReset\u003c/button\u003e\n\u003c/div\u003e\n```\n\nIf you want to use the copy to clipboard feature, include this file in your project:\n```js\n\u003cscript src=\"./js/copy-to-clipboard.js\"\u003e\u003c/script\u003e\n```\n\n## CDN\n```css\n\u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/amiryxe/credit-card-input/css/credit-card-input.min.css\"\u003e\n```\n\n```js\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/amiryxe/credit-card-input/js/credit-card-input.min.js\"\u003e\u003c/script\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famiryxe%2Fcredit-card-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famiryxe%2Fcredit-card-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famiryxe%2Fcredit-card-input/lists"}