@chess-components/board
v0.1.0
Published
`@chess-components/board` is a lightweight chessboard [web component](https://developer.mozilla.org/en-US/docs/Web/API/Web_components), designed for integrating chessboards seamlessly into your web applications.
Downloads
8
Readme
Chessboard
@chess-components/board
is a lightweight chessboard web component, designed for integrating chessboards seamlessly into your web applications.
Usage
To start using the chessboard component, follow these steps:
Install the package using npm:
npm install @chess-components/board
Include the necessary script tag in your HTML file to import the module:
<script type="module" src="node_modules/@chess-components/board"></script>
Add default styles to your HTML file to ensure the board is properly displayed:
<link rel="stylesheet" href="node_modules/@chess-components/board/dist/assets/backgrounds/brown.css" /> <link rel="stylesheet" href="node_modules/@chess-components/board/dist/assets/piecesets/cburnett.css" />
These stylesheets provide default backgrounds and piece sets for the chessboard.
Place the chessboard element within your HTML where you want it to appear:
<chess-board></chess-board>
Notes
@chess-components/board
provides the fundamental structure for a chessboard, serving as a solid foundation for creating chess games or editors.