Skip to content

moterink/chessboard

Repository files navigation

Chessboard Continuous integration NPM Version

@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:

  1. Install the package using npm:

    npm install @chess-components/board
  2. Include the necessary script tag in your HTML file to import the module:

    <script type="module" src="node_modules/@chess-components/board"></script>
  3. 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.

  4. 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.

About

Chessboard web component

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages