{"id":21961812,"url":"https://github.com/trapcodeio/vue-swift-alert","last_synced_at":"2025-04-02T23:42:31.083Z","repository":{"id":57396648,"uuid":"405412386","full_name":"trapcodeio/vue-swift-alert","owner":"trapcodeio","description":"Simple Hide and Show Vue Package.","archived":false,"fork":false,"pushed_at":"2024-08-11T12:22:21.000Z","size":74,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T02:44:33.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/trapcodeio.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":"2021-09-11T15:19:34.000Z","updated_at":"2023-05-20T22:37:02.000Z","dependencies_parsed_at":"2024-08-11T13:49:35.892Z","dependency_job_id":null,"html_url":"https://github.com/trapcodeio/vue-swift-alert","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fvue-swift-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fvue-swift-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fvue-swift-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fvue-swift-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trapcodeio","download_url":"https://codeload.github.com/trapcodeio/vue-swift-alert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246911490,"owners_count":20853654,"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":[],"created_at":"2024-11-29T10:18:23.546Z","updated_at":"2025-04-02T23:42:31.059Z","avatar_url":"https://github.com/trapcodeio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-swift-alert\n\nStage: Personal.\n\n## Single Alerts\n\n```vue\n\n\u003cscript lang=\"ts\" setup\u003e\nimport {swiftAlert} from \"vue-swift-alert\";\nimport SwiftAlert from \"vue-swift-alert/src/swift-alert.vue\";\n\nconst loginMsg = swiftAlert('loginMsg');\n\nloginMsg.show() // Show alert content\nloginMsg.hide() // Hide alert content\nloginMsg.toggle() // Toggle alert content\n\nloginMsg.message('Your Login was successful.'); // Set message\nloginMsg.message(); // get message\n\nloginMsg.meta // Reactive alert meta data {message: string}\nloginMsg.meta.message = 'Your Login was successful.'; // Set message\nloginMsg.meta.message // Get message\n\n// Meta also serves as a reactive store for any data relating to this alert.\nloginMsg.meta.some_other_key = \"Some other value\";\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cSwiftAlert id=\"loginMsg\"\u003e\n    \u003cspan class=\"success\"\u003e{{loginMsg.meta.message}}\u003c/span\u003e\n    \u003c!-- OR --\u003e\n    \u003cspan class=\"success\"\u003e{{loginMsg.message()}}\u003c/span\u003e\n  \u003c/SwiftAlert\u003e\n\u003c/template\u003e\n```\n\n## Multiple Alerts\n```vue\n\n\u003cscript lang=\"ts\" setup\u003e\nimport {swiftAlerts} from \"vue-swift-alert\";\n\n// Control Multiple Alerts\nconst alerts = swiftAlerts(\"loginSuccess\", \"loginError\");\n\nalerts.show('loginError')\nalerts.hide('loginSuccess')\nalerts.toggle('loginError')\nalerts.hideAll();\nalerts.showAll();\n\n// Destruct Single Swift Alert instances.\nconst {loginError, loginSuccess} = swiftAlerts(\"loginSuccess\", \"loginError\").toObject();\n\nloginError.show()\nloginSuccess.hide()\n\n// Destruct Single Swift Alert instances.\nconst [error, success] = swiftAlerts(\"loginSuccess\", \"loginError\").toArray();\n\nerror.show()\nsuccess.hide()\n\nalerts.show('loginError')\n\u003c/script\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapcodeio%2Fvue-swift-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrapcodeio%2Fvue-swift-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapcodeio%2Fvue-swift-alert/lists"}