{"id":19312156,"url":"https://github.com/bigcommerce/themes-lib-modal","last_synced_at":"2026-06-11T01:31:34.401Z","repository":{"id":43901554,"uuid":"373506365","full_name":"bigcommerce/themes-lib-modal","owner":"bigcommerce","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-17T12:54:59.000Z","size":1335,"stargazers_count":0,"open_issues_count":20,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-04-18T00:38:27.678Z","etag":null,"topics":[],"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/bigcommerce.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-06-03T12:52:57.000Z","updated_at":"2023-10-20T22:37:30.000Z","dependencies_parsed_at":"2024-11-10T00:33:30.609Z","dependency_job_id":"7312403d-2e84-48fc-bae3-2bd1fd4f6f66","html_url":"https://github.com/bigcommerce/themes-lib-modal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bigcommerce/themes-lib-modal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-modal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-modal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-modal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-modal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigcommerce","download_url":"https://codeload.github.com/bigcommerce/themes-lib-modal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-modal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34178819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":[],"created_at":"2024-11-10T00:33:15.903Z","updated_at":"2026-06-11T01:31:34.380Z","avatar_url":"https://github.com/bigcommerce.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bigcommerce Modal Module\n\n## Installation\n\nNPM:\n\n```\nnpm i github:pixelunion/bc-modal\n```\n\n## Usage\n\n```\n\u003cdiv id=\"review-modal\"\u003e\n\t\u003ch1\u003eHere's my modal!\u003c/h1\u003e\n\u003c/div\u003e\n```\n\n```\n#review-modal {\n\tdisplay: none;\n}\n```\n\n```\nimport $ from 'jquery';\nimport Modal from 'bc-modal';\n\nconst reviewModal = new Modal({\n  el: $('#review-modal')\n});\n\n$('button').on('click', (event) =\u003e {\n\treviewModal.open();\n});\n```\n\n## Options\n\n#### `el`\n\nThe jQuery object of the modal markup. The modal will be filled with the _contents_ of this element, not the element itself. Required.\n\n#### `modalId`\n\nId of the modal wrapper element. Defaults to `#modal`.\n\n#### `modalClass`\n\nOptional additional class to add to the `.modal` element.\n\n#### `bodyOverflowClass`\n\nThe class added to the body when the modal is open. Defaults to `scroll-locked`.\n\n#### `bodyOverflowClass`\n\nThe class added to the body when the modal is open. Defaults to `scroll-locked`.\n\n#### `centerVertically`\n\nWhether or not to automatically center the modal vertically, defaults to `true`.\n\n#### `closeSelector`\n\nA selector string for a close button within the modal.\n\n#### `afterShow`\n\nA popular television program produced out of Toronto that ran after MTV's _The Hills_ in the early 2000's.\n\n#### `afterHide`\n\nNot a television program, but a callback. Does what you think it would.\n\n## Methods\n\n`open()` and `close()` should get you where you need to be.\n\n`position()` will force a recalculation of the modal position, if `centerVertically` is enabled.\n\n## Styling\n\n`./dist/scss/modal.scss` has enough styles for things to work by default.\n\n#### `.modal-wrapper`\n\nThe container, shouldn't need any styling.\n\n#### `.modal`\n\nThe constrained 'box' for the modal - apply width dimensions etc here\n\n#### `.modal-content`\n\nPut the meat of your modal styles here: backgrounds, borders, shadows, anything you want!!!\n\n### Animation classes\n\nTransitions are handled via jQuery.revealer and can therefore be overridden in your css: have a look at [the docs](https://github.com/PixelUnion/jquery.revealer) (or modal.scss) specifics.\n\n## Further Development\n\nFor debugging or improvements you can run a standalone demo version of the modal using a very basic node server:\n\n```\n$ npm install\n$ npm run serve\n```\n\nThis will allow you to make changes to the JS and HTML. To re-compile the scss you'll need to run `npm run build` from a separate terminal window after each change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fthemes-lib-modal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigcommerce%2Fthemes-lib-modal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fthemes-lib-modal/lists"}