# Chessboard

A framework-independent chessboard for legal moves, annotations, PGN replay, and pointer, touch, and keyboard interaction.

Technologies: TypeScript, Web Components

Source code: https://github.com/mayazrakib/chessboard

Updated: 2026-11-11

## 1. A Board for Web Applications

Chessboard is a framework-independent Web Component for playing, annotating, and replaying chess games. The package provides legal moves, premoves, controlled moves, annotations, and game history. Try the [interactive showcase](https://showcase.mayazrakib.com/).

## 2. Install and Integrate

Install `@mayazrakib/chessboard`, import it in bundled JavaScript, add a `<chess-board>` element, and await `when_ready()` before calling its API. The [repository](https://github.com/mayazrakib/chessboard) documents setup, configuration, and current package exports.

The API provides position and PGN operations, move history, annotations, and controlled move requests. A host can accept or reject controlled moves after its own validation.

## 3. Interaction and Limits

The board supports mouse, touch, and keyboard interaction. Its documented keyboard controls include Shift and arrow keys for square navigation, Enter or Space for selection, and arrow keys for history. Accessibility depends on the surrounding application, browser, and assistive technology. Test keyboard focus, move feedback, and supported devices in the actual integration.

Author: Mayaz Rakib
Canonical URL: https://mayazrakib.com/projects/chessboard
