{"id":16294162,"url":"https://github.com/sarfraznawaz2005/smart-button","last_synced_at":"2026-05-20T07:33:38.836Z","repository":{"id":136959997,"uuid":"243489462","full_name":"sarfraznawaz2005/smart-button","owner":"sarfraznawaz2005","description":"Smart Button Web Component","archived":false,"fork":false,"pushed_at":"2020-02-27T12:03:11.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T11:15:59.585Z","etag":null,"topics":["html","javascript","web-components","webcomponents"],"latest_commit_sha":null,"homepage":null,"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/sarfraznawaz2005.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,"publiccode":null,"codemeta":null}},"created_at":"2020-02-27T10:13:15.000Z","updated_at":"2020-02-27T12:03:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"bf111aca-134b-4742-b888-0548fe7e75db","html_url":"https://github.com/sarfraznawaz2005/smart-button","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sarfraznawaz2005/smart-button","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarfraznawaz2005%2Fsmart-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarfraznawaz2005%2Fsmart-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarfraznawaz2005%2Fsmart-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarfraznawaz2005%2Fsmart-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sarfraznawaz2005","download_url":"https://codeload.github.com/sarfraznawaz2005/smart-button/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarfraznawaz2005%2Fsmart-button/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266841355,"owners_count":23993491,"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-07-24T02:00:09.469Z","response_time":99,"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":["html","javascript","web-components","webcomponents"],"created_at":"2024-10-10T20:14:22.733Z","updated_at":"2026-05-20T07:33:33.815Z","avatar_url":"https://github.com/sarfraznawaz2005.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart-Button Web Component\n\nA button of type `submit` that when clicked does these things automatically:\n\n- Disables itself (to avoid duplicate form submissions)\n- Changes text to `Wait...` by default\n- Enables back and restores original button text after given time\n\n\n## Usage\n\n\n````html\n\n\u003c!-- load webcomponents bundle, which includes all the necessary polyfills --\u003e\n\u003cscript src=\"https://unpkg.com/@webcomponents/webcomponentsjs@2.4.2/webcomponents-bundle.js\"\u003e\u003c/script\u003e\n\n\u003c!-- load the element --\u003e\n\u003cscript type=\"module\" src=\"smartbutton.js\"\u003e\u003c/script\u003e\n\n\u003c!-- use the element --\u003e\n\u003cform\u003e\n    \u003csmart-button\u003eSubmit\u003c/smart-button\u003e\n\u003c/form\u003e\n\n````\n\n## Attributes\n\n- `timeout`: Time button will be enabled back and restore original text. Default `5000`\n- `text`: Label of button that will be applied when button is clicked. Default `Wait...`\n\n**Example**\n\n````html\n\u003csmart-button timeout=\"8000\" text=\"Please Wait...\"\u003eUpdate\u003c/smart-button\u003e\n````","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarfraznawaz2005%2Fsmart-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarfraznawaz2005%2Fsmart-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarfraznawaz2005%2Fsmart-button/lists"}