JamesTeague / vue-chessground

vue-chessground is a Vue Wrapper of the original Chessground UI developed for lichess.org. This project currently contains no chess logic, please visit chess.js for validation/generation or chess-moves for a more tailored approach.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-chessground · package vue3 ts

vue-chessground is a Vue Wrapper of the original Chessground UI developed for lichess.org. This project currently contains no chess logic, please visit chess.js for validation/generation.

This package is in very early stages of development, thus usage of this package in TypeScript is highly recommended.

Installation

Currently, the package has peerDependencies on vue: ^3.2.26.

# If you are using pnpm:
pnpm install vue-chessground

# If you are using npm:
npm install vue-chessground

# If you are using yarn:
yarn add vue-chessground

Documentation

After installing, the component can be imported by name. It has 3 optional props:

  • size: string defaults to 512px, determines height and width of the chessboard in pixels

  • config: Partial<Config> defaults to {}, determines various configuration properties of Chessground

  • arrows: DrawShape[] defaults to [], determines if any arrows should be added to the board

Renders a simple 512 x 512 board, with pieces in their default position:

import { Chessboard } from 'vue-chessground';

// this style must be imported somewhere
import 'vue-chessground/chessboard.css';

About

vue-chessground is a Vue Wrapper of the original Chessground UI developed for lichess.org. This project currently contains no chess logic, please visit chess.js for validation/generation or chess-moves for a more tailored approach.

License:GNU General Public License v3.0


Languages

Language:TypeScript 38.4%Language:Vue 28.9%Language:JavaScript 18.7%Language:HTML 9.1%Language:Shell 5.0%