{"id":15295956,"url":"https://github.com/zhangchenglin/bs-components-js","last_synced_at":"2026-01-20T20:02:44.862Z","repository":{"id":42537880,"uuid":"174832092","full_name":"ZhangChengLin/bs-components-js","owner":"ZhangChengLin","description":"bootstrap v5 Modal JavaScript Function package.","archived":false,"fork":false,"pushed_at":"2023-02-11T22:48:49.000Z","size":2213,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-09T02:42:28.913Z","etag":null,"topics":["bootstrap","bootstrap-modal","bootstrap5"],"latest_commit_sha":null,"homepage":"","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/ZhangChengLin.png","metadata":{"files":{"readme":"README-modal.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":"2019-03-10T14:07:29.000Z","updated_at":"2023-06-20T12:45:09.000Z","dependencies_parsed_at":"2024-12-19T13:22:48.850Z","dependency_job_id":"d74dbe8b-6035-4bea-86be-519787892659","html_url":"https://github.com/ZhangChengLin/bs-components-js","commit_stats":{"total_commits":108,"total_committers":2,"mean_commits":54.0,"dds":0.0092592592592593,"last_synced_commit":"a8b01fc9781781f180e294b49cea163599785ebe"},"previous_names":["zhangchenglin/bootstrap-modal-js"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ZhangChengLin/bs-components-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhangChengLin%2Fbs-components-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhangChengLin%2Fbs-components-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhangChengLin%2Fbs-components-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhangChengLin%2Fbs-components-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZhangChengLin","download_url":"https://codeload.github.com/ZhangChengLin/bs-components-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhangChengLin%2Fbs-components-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28612157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bootstrap","bootstrap-modal","bootstrap5"],"created_at":"2024-09-30T18:08:45.060Z","updated_at":"2026-01-20T20:02:44.839Z","avatar_url":"https://github.com/ZhangChengLin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bsModalJs\n\n## Demo\n\n[https://ZhangChengLin.github.io/bs-components-js/docs/demo-modal.html](https://ZhangChengLin.github.io/bs-components-js/docs/demo-modal.html)\n\n\n---\n\n## Table of Contents\n\n| Contents                                        |\n|:------------------------------------------------|\n| [How to install](#how-to-install)               |\n| [How to use](#how-to-use)                       |\n| [Parameter Description](#parameter-description) |\n\n## How to install\n\n- Install via NPM package\n\n```\nnpm i bs-components-js --save\n```\n\n---\n\n## How to use\n\n```\n\u003ca href=\"javascript:;\" onclick=\"bsModalJs(parameter)\"\u003etext\u003c/a\u003e\n\n\u003cscript src=\"./dist/umd/bsModalJs.js\"\u003e\u003c/script\u003e\n```\n\nOR\n\n```\n\u003ca href=\"javascript:;\" id=\"xx\"\u003etext\u003c/a\u003e\n\n\u003cscript src=\"./dist/umd/bsOffcanvasJs.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    const xx = document.querySelector(\"#xx\");\n    xx.addEventListener(\"click\", function () {\n        bsModalJs(parameter);\n    })\n\u003c/script\u003e\n```\n\nOR MORE\n\n## Parameter Description\n\nCurrently, relying on Bootstrap v5, because it is a function package of Bootstrap modal.\n\nSupports arbitrary calls of 9 parameters, supports callback functions based on modal events.\n\n```\nbsModalJs(title, body, footer, ModalSizes, VerticallyCentered, LongContentType, Options, EventType, CallbackFunction)\n```\n\n**Return Values**\n\n|  type  |    such as    |     Description      |\n|:------:|:-------------:|:--------------------:|\n| String | 1552756356601 | modal element number |\n\n---\n\n**title**\n-\n\nType: String \\| Function \\| Function HTMLElement\n\nDefault value: undefined\n\nDescription: If you want to add a child element to the '.modal-header' element, use the Function HTMLElement.\n\n说明： 如果要向 \".modal-header\" 元素添加子元素，请使用 Function HTMLElement。\n\n---\n\n**body**\n-\n\nType: String \\| Function \\| Function HTMLElement\n\nDefault value: undefined\n\nDescription:\n\n---\n\n**footer**\n-\n\nType: String \\| Function \\| Function HTMLElement\n\nDefault value: undefined\n\nDescription:\n\n---\n\n**ModalSizes**\n-\n\nType: String\n\nDefault value: undefined\n\nDescription:\n\n| parameter |\n|:---------:|\n|    sm     |\n|    lg     |\n|    xl     |\n|   full    |\n|  full-sm  |\n|  full-md  |\n|  full-lg  |\n|  full-xl  |\n| full-xxl  |\n\n---\n\n**VerticallyCentered**\n-\n\nType: Boolean\n\nDefault value: false\n\nDescription:\n\n| parameter |\n|:---------:|\n|   true    |\n|   false   |\n\n---\n\n**LongContentType**\n-\n\nType: Boolean\n\nDefault value: false\n\nDescription:\n\n| parameter |\n|:---------:|\n|   true    |\n|   false   |\n\n---\n\n**Options**\n-\n\nType: Object\n\nDefault value:\n\nDescription: \u003ca href=\"https://getbootstrap.com/docs/4.3/components/modal/#options\" target=\"_blank\"\u003eBootstrap Modal\noptions\u003c/a\u003e\n\n| parameter | default value (boolean) |         other         |\n|:---------:|:-----------------------:|:---------------------:|\n| backdrop  |          true           | false \u0026#124; \"static\" |\n| keyboard  |          true           |         false         |\n|   focus   |          true           |         false         |\n\n---\n\n**Events Type**\n-\n\nType: String\n\nDefault value: undefined\n\nDescription:\n\n|   parameter   |\n|:-------------:|\n|     show      |\n|     shown     |\n|     hide      |\n|    hidden     |\n| hidePrevented |\n\n---\n\n**Events Function**\n-\n\nType: Function\n\nDefault value: undefined\n\nDescription:\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhangchenglin%2Fbs-components-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhangchenglin%2Fbs-components-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhangchenglin%2Fbs-components-js/lists"}