{"id":20508997,"url":"https://github.com/getmindspun/bootstrap-js-buttons","last_synced_at":"2026-05-18T00:01:58.445Z","repository":{"id":119471275,"uuid":"375777293","full_name":"getmindspun/bootstrap-js-buttons","owner":"getmindspun","description":"Create Bootstrap button variants in Javascript.","archived":false,"fork":false,"pushed_at":"2021-06-17T21:42:57.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-19T03:59:09.063Z","etag":null,"topics":["bootstrap","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/getmindspun.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-06-10T17:24:26.000Z","updated_at":"2021-06-17T21:43:00.000Z","dependencies_parsed_at":"2023-07-16T05:16:12.015Z","dependency_job_id":null,"html_url":"https://github.com/getmindspun/bootstrap-js-buttons","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":0.08333333333333337,"last_synced_commit":"802fa5ba02b9442aa8ad22e26b4a17c348595264"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/getmindspun/bootstrap-js-buttons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getmindspun%2Fbootstrap-js-buttons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getmindspun%2Fbootstrap-js-buttons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getmindspun%2Fbootstrap-js-buttons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getmindspun%2Fbootstrap-js-buttons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getmindspun","download_url":"https://codeload.github.com/getmindspun/bootstrap-js-buttons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getmindspun%2Fbootstrap-js-buttons/sbom","scorecard":{"id":424445,"data":{"date":"2025-08-11","repo":{"name":"github.com/getmindspun/bootstrap-js-buttons","commit":"802fa5ba02b9442aa8ad22e26b4a17c348595264"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T01:57:00.295Z","repository_id":119471275,"created_at":"2025-08-19T01:57:00.295Z","updated_at":"2025-08-19T01:57:00.295Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33160167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: 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","javascript"],"created_at":"2024-11-15T20:21:44.185Z","updated_at":"2026-05-18T00:01:58.411Z","avatar_url":"https://github.com/getmindspun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003ebootstrap-js-buttons\u003c/h1\u003e\n  \u003ch4\u003eCreate Bootstrap button variants in Javascript.\u003c/h4\u003e\n  \u003cimg src=\"img/buttons.png\" alt=\"Bootstrap button variants\"\u003c/img\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eMaintained by \u003ca href=\"https://www.mindspun.com/\"\u003eMindspun\u003c/a\u003e.\u003c/sub\u003e\n\u003c/div\u003e\n\n## Live Demo\nhttps://getmindspun.github.io/bootstrap-js-buttons/\n\n## Installation\n\n### From CDN\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/bootstrap-js-buttons@latest/dist/bootstrap-js-buttons.min.js\"\u003e\u003c/script\u003e\n```\n\n### As a module\n```html\nconst bs = require('bootstrap-js-buttons');\n```\n\n## Quick Start\n```js\nbs.buttonVariant('.btn-accent-solid', '#FF1A75');\nbs.buttonOutlineVariant('.btn-accent-outline', '#FF1A75');\n```\n\n## Motivation\nDefining additional button styles in Bootstrap requires you to use a SASS mixin,\nwhich you can only do at build time.  This makes changing buttons at runtime impossible and\nprevents common use cases like letting a user choose their accent color.  Worse, you can't use\nCSS custom properties for the colors since the SASS mixins won't work.\nDefining the buttons in Javascript solves this and let's you redefine the style whenever\na color changes.\n\n## How it works\nEach call to one of the button functions generates an associated \u003cstyle\u003e tag that\nis added to the head element of the document.  Calling the function again with the\nsame name replaces any previous styles so to update a given button variant, just\ncall the function again.\n\n## Functions\nThere are two main functions corresponding to the SASS mixins *button-variant* and *button-outline-variant*.\n\n**buttonVariant(name, background, border, options)**\n\n**buttonOutlineVariant(name, color, options)**\n\n### options\nEach function takes an optional *options* parameter.  Options correspond to SASS\nvariables in Bootstrap.  In other words, what you'd modify in *_variables.scss* for Bootstrap\nyou pass as *options* in Javascript.  The names are the same, just translated to\nCamelCase.  Below are the options and their associated default values.\n```js\ncolorContrastLight = '#ffffff';\ncolorContrastDark = '#000000';\nminContrastRatio = 4.5;\nbtnHoverBgShadeAmount = 15;\n\nbtnHoverBgTintAmount = 15;\nbtnHoverBorderShadeAmount = 20;\nbtnHoverBorderTintAmount = 10;\nbtnActiveBgShadeAmount = 20;\nbtnActiveBgTintAmount = 20;\nbtnActiveBorderShadeAmount = 25;\nbtnActiveBorderTintAmount = 10;\nbtnBoxShadow = `inset 0 1px 0 ${rgba('#ffffff', .15)}, 0 1px 1px ${rgba('#000000', .075)} !default`;\nbtnActiveBoxShadow = `inset 0 3px 5px ${rgba('#000000', .125)}`;\n\nenableGradients = false;\nenableShadows = false;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetmindspun%2Fbootstrap-js-buttons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetmindspun%2Fbootstrap-js-buttons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetmindspun%2Fbootstrap-js-buttons/lists"}