{"id":32982904,"url":"https://github.com/vitogit/vue-chessboard","last_synced_at":"2026-02-03T21:17:00.387Z","repository":{"id":37752422,"uuid":"119081360","full_name":"vitogit/vue-chessboard","owner":"vitogit","description":"Chessboard vue component to load positions, create positions and see threats","archived":false,"fork":false,"pushed_at":"2022-12-02T09:47:51.000Z","size":524,"stargazers_count":172,"open_issues_count":26,"forks_count":50,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-11-23T14:12:06.916Z","etag":null,"topics":["chess","chessboard","vue","vue-chessboard","vuejs"],"latest_commit_sha":null,"homepage":"http://vitomd.com/vue-chessboard-examples/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitogit.png","metadata":{"files":{"readme":"README.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}},"created_at":"2018-01-26T17:23:41.000Z","updated_at":"2025-10-15T23:50:00.000Z","dependencies_parsed_at":"2023-01-22T22:15:28.033Z","dependency_job_id":null,"html_url":"https://github.com/vitogit/vue-chessboard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vitogit/vue-chessboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitogit%2Fvue-chessboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitogit%2Fvue-chessboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitogit%2Fvue-chessboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitogit%2Fvue-chessboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitogit","download_url":"https://codeload.github.com/vitogit/vue-chessboard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitogit%2Fvue-chessboard/sbom","scorecard":{"id":924200,"data":{"date":"2025-08-11","repo":{"name":"github.com/vitogit/vue-chessboard","commit":"5c7db9becbde32f0ad234453b0a70c95090d0d73"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 1/21 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":"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":"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":"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"45 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"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-25T09:05:31.690Z","repository_id":37752422,"created_at":"2025-08-25T09:05:31.690Z","updated_at":"2025-08-25T09:05:31.690Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29057377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T20:13:53.544Z","status":"ssl_error","status_checked_at":"2026-02-03T20:13:40.507Z","response_time":96,"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":["chess","chessboard","vue","vue-chessboard","vuejs"],"created_at":"2025-11-13T07:00:32.992Z","updated_at":"2026-02-03T21:17:00.380Z","avatar_url":"https://github.com/vitogit.png","language":"Vue","funding_links":[],"categories":["UI组件","Components \u0026 Libraries","UI Components","UI Components [🔝](#readme)"],"sub_categories":["杂","UI Components","Miscellaneous"],"readme":"# vue-chessboard\n\n[![npm](https://img.shields.io/npm/v/vue-chessboard.svg) ![npm](https://img.shields.io/npm/dm/vue-chessboard.svg)](https://www.npmjs.com/package/vue-chessboard)\n[![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/)\n\nChessboard vue component to load positions, create positions and see threats\n\n- It uses [chess.js](https://github.com/jhlywa/chess.js) for chess movements and validations\n- It uses chessground for chessboard UI  [chessground](https://github.com/ornicar/chessground)\n\n![http://g.recordit.co/40JDuy8tAk.gif](http://g.recordit.co/40JDuy8tAk.gif)\n\nCheck live examples: [http://vitomd.com/vue-chessboard-examples/](http://vitomd.com/vue-chessboard-examples/)\n\n## Table of contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Example](#example)\n\n# Installation\n\n```\nnpm install --save vue-chessboard\n```\n\n## Default component import\n\n\n```javascript\nimport {chessboard} from 'vue-chessboard'\nimport 'vue-chessboard/dist/vue-chessboard.css'\n```\n\nThen use it in your template\n```html\n    \u003cchessboard/\u003e\n```\n\n## Browser\n\n```html\n\u003cdiv id=\"app\"\u003e\n  \u003cchessboard\u003e\u003c/chessboard\u003e\n\u003c/div\u003e\n\n\u003clink rel=\"stylesheet\" href=\"vue-chessboard/dist/vue-chessboard.css\"/\u003e\n\n\u003cscript src=\"vue.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"vue-chessboard/dist/vue-chessboard.browser.js\"\u003e\u003c/script\u003e\n\n\u003cscript\u003e\nnew Vue({\n  el: '#app',\n  components: {\n    VueChessboard\n  }\n});\n\u003c/script\u003e\n```\n\n# Examples\n\n  Check live examples: [http://vitomd.com/vue-chessboard-examples/](http://vitomd.com/vue-chessboard-examples/)\n\n  Check live examples repository: [https://github.com/vitogit/vue-chessboard-examples](https://github.com/vitogit/vue-chessboard-examples)\n\n  Check full application using the component: [Chess Guardian](http://vitomd.com/vue-chess-guardian/)\n\n  #### Simple Chessboard with legal moves\n  ```html\n    \u003cchessboard/\u003e\n  ```\n  #### Simple Chessboard with free moves\n  ```html\n    \u003cchessboard :free=\"true\"/\u003e\n  ```\n\n  #### Simple Chessboard with black orientation. Default is white\n  ```html\n    \u003cchessboard orientation=\"black\"/\u003e\n  ```\n\n  #### Simple Chessboard that shows threats for current position and player\n  ```html\n    \u003cchessboard :showThreats=\"true\"/\u003e\n  ```\n\n  #### Fen binded to the chessboard (load position when click on a new position)\n  ```html\n    \u003cchessboard :fen=\"currentFen\"/\u003e\n    \u003cbutton class=\"button is-light\" @click=\"loadFen(fen)\" v-for=\"fen in fens\"\u003e\n      {{fen}}\n    \u003c/button\u003e\n  ```\n\n  #### Chessboard with onmove callback. Returns positional info { \"legal_black\": 20, \"checks_black\": 0, \"threat_black\": 0, \"turn\": \"black\" } after each move.\n  It also returns the fen and the history data. \n  ```html\n    \u003cchessboard @onMove=\"showInfo\"/\u003e\n    \u003cdiv\u003e\n      {{this.positionInfo}}\n    \u003c/div\u003e\n  ```\n  ```js\nshowInfo(data) {\n    this.positionInfo = data\n}\n  ```\n\n  #### Chessboard with onpromote callback\n  When there is a promotion it will execute the callback. Just return the first letter of the piece: q:Queen, r:Rook, k:Knight, b:Bishop\n  ```html\n    \u003cchessboard :onPromotion=\"promote\"/\u003e\n  ```\n  ```js\npromote() {\n    return 'r' // This will promote to a rook\n}\n  ```\n\n  #### Extended Component (Play vs random AI). \n  \u003cp\u003e You can extend the chessboard component to add new methods\u003c/p\u003e\n  \n  ```html\n    // newboard.vue\n    \u003cscript\u003e\n    import { chessboard }  from 'vue-chessboard'\n\n    export default {\n      name: 'newboard',\n      extends: chessboard,\n      methods: {\n        userPlay() {\n          return (orig, dest) =\u003e {\n            if (this.isPromotion(orig, dest)) {\n              this.promoteTo = this.onPromotion()\n            }\n            this.game.move({from: orig, to: dest, promotion: this.promoteTo}) // promote to queen for simplicity\n            this.board.set({\n              fen: this.game.fen()\n            })\n            this.calculatePromotions()\n            this.aiNextMove()\n          };\n        },\n        aiNextMove() {\n          let moves = this.game.moves({verbose: true})\n          let randomMove = moves[Math.floor(Math.random() * moves.length)]\n          this.game.move(randomMove)\n\n          this.board.set({\n            fen: this.game.fen(),\n            turnColor: this.toColor(),\n            movable: {\n              color: this.toColor(),\n              dests: this.possibleMoves(),\n              events: { after: this.userPlay()},\n            }\n          });\n        },\n      },\n      mounted() {\n        this.board.set({\n          movable: { events: { after: this.userPlay()} },\n        })\n      }\n    }\n    \u003c/script\u003e\n  ```\n---\n\n## Want to see all my chess related projects? \n\nCheck [My projects](http://vitomd.com/blog/projects/) for a full detailed list.\n\n## License\n\nGPL-3.0 \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitogit%2Fvue-chessboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitogit%2Fvue-chessboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitogit%2Fvue-chessboard/lists"}