Skip to content

Releases: slate-chess/chessmen

Release list

chessmen 0.5.0

Choose a tag to compare

@alexlinu alexlinu released this 19 Oct 14:11

chessmen is the chessboard for the web: replay PGN games or show FEN diagrams with one script tag and no dependencies.

This is the first published release. The library was previously developed as Slate Chessboard and was never published under that name, so there is no deprecated package and no migration path to maintain — if you are starting now, you are starting here.

Install

npm install chessmen

Or one script tag, nothing to build:

<div id="board"></div>
<script src="https://cdn.jsdelivr.net/npm/chessmen@0.5.0/dist/chessmen.all.js"></script>
<script>
  Chessmen.create(document.getElementById("board"), { games: pgnText });
</script>

What it does

  • Animated PGN replay: move animation, last-move arrow, controls, game picker, keyboard navigation.
  • Static diagrams from a FEN, for puzzles and lesson pages.
  • Arrows, circles and badges, plus a second board that slides in for variations.
  • 20 board themes and two Staunton piece sets, matching the Slate Chess app.
  • A no-code embed: <div data-chessmen data-src="game.pgn"> with no JavaScript of your own.
  • SVG rendering, server-side renderable, no runtime dependencies to install.

Move parsing and legality come from chess.js (bundled, BSD 2-Clause).

Renamed from Slate Chessboard

If you were using the unreleased slate-chessboard code from this repository, the names changed:

Was Now
dist/slate-chessboard.* dist/chessmen.*
SlateChessboard Chessmen
data-slate-chessboard data-chessmen
.slate-chessboard host class .chessmen
sb- / --sb-* CSS cm- / --cm-*
postMessage({ slateChessboard: … }) postMessage({ chessmen: … })

Error messages are now prefixed chessmen:. Restyle any page that targeted the old class names.

Verified in this release

  • 16/16 tests passing on Node 20 and 22 in CI.
  • dist/ is checked in and CI fails if it drifts from src/.
  • prepublishOnly runs the full build and test suite before anything reaches the registry.
  • Apache 2.0, with LICENSE, NOTICE and THIRD-PARTY-NOTICES.md shipped inside the package.

Full detail in CHANGELOG.md.