{"id":19429605,"url":"https://github.com/codersuresh/alert-for-web","last_synced_at":"2026-04-18T11:33:02.579Z","repository":{"id":186786908,"uuid":"675776804","full_name":"coderSuresh/alert-for-web","owner":"coderSuresh","description":"Simple alert dialog component for web","archived":false,"fork":false,"pushed_at":"2024-04-09T04:17:31.000Z","size":109,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T05:42:54.002Z","etag":null,"topics":["frontend","hacktoberfest","hacktoberfest2023","npm-package"],"latest_commit_sha":null,"homepage":"https://codersuresh.github.io/alert-for-web/","language":"TypeScript","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/coderSuresh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-07T17:39:21.000Z","updated_at":"2023-10-23T07:30:02.000Z","dependencies_parsed_at":"2023-08-18T12:12:13.712Z","dependency_job_id":"bbf4d17f-c9cb-42fe-a6a2-537a5a1d039c","html_url":"https://github.com/coderSuresh/alert-for-web","commit_stats":null,"previous_names":["codersuresh/web-alert","codersuresh/alert-for-web"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coderSuresh/alert-for-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderSuresh%2Falert-for-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderSuresh%2Falert-for-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderSuresh%2Falert-for-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderSuresh%2Falert-for-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderSuresh","download_url":"https://codeload.github.com/coderSuresh/alert-for-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderSuresh%2Falert-for-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31967007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["frontend","hacktoberfest","hacktoberfest2023","npm-package"],"created_at":"2024-11-10T14:20:02.538Z","updated_at":"2026-04-18T11:33:02.544Z","avatar_url":"https://github.com/coderSuresh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alert for Web - Show alert message on web page\n\n[![npm version](https://badge.fury.io/js/alert-for-web.svg)](https://badge.fury.io/js/alert-for-web)\n[![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT)\n\nThis is a simple script that shows an alert message on a web page. It can be used to show a message on a web page when a certain event occurs. For example, when a backup is completed, or when a long running process is finished.\n\n## installation\n\n```\nnpm install alert-for-web\n```\n\n## Usage\n\n``index.html``\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eAlert for Web\u003c/title\u003e\n    \u003c!-- package css --\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://www.unpkg.com/alert-for-web@0.1.2/dist/style.css\"\u003e\n    \u003cscript src=\"app.js\" type=\"module\"\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cbutton class=\"btn\"\u003eShow Alert\u003c/button\u003e\n  \u003c/body\u003e\n```\n\n``app.js ``\n```javascript\n//import package\nimport showAlert from \"https://www.unpkg.com/alert-for-web@0.1.2/dist/main.js\";\n\n    //use any element to trigger the alert\n    const btn = document.querySelector('.btn');\n\n    btn.addEventListener(\"click\", () =\u003e {\n    //call the showAlert function\n      showAlert({\n        title: \"Success\",\n        message: \"This is a success alert\",\n        level: \"success\",\n        button: \"Close\"\n      })\n    })\n```\n\n## Options\n\n| Option | Type | Default | Optional | Description |\n| ------ | ---- | ------- | -------- | ----------- |\n| title | string | null | no | The title of the alert |\n| message | string | null | no | The message of the alert |\n| level | string | success | yes | The level of the alert. Possible values are: success, warning, error. |\n| button | string | Close | yes | The text of the button |\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n## Authors\n\n- [@Shishir98123](https://www.github.com/Shishir98123)\n- [@coderSuresh](https://www.github.com/coderSuresh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodersuresh%2Falert-for-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodersuresh%2Falert-for-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodersuresh%2Falert-for-web/lists"}