Go boards for the web
Board rendering, game logic, SGF parsing, and an embeddable player widget — one lightweight package.
npm install jgoboard
Board in five lines
import { createBoard, STONE, createRenderer } from 'jgoboard';
const board = createBoard({ size: 9 });
board.setStone('E5', STONE.BLACK);
const renderer = createRenderer('#el', { board, theme: 'kaya-medium' });
await renderer.whenReady();
Or skip the build step — load from CDN:
<script src="https://cdn.jsdelivr.net/npm/jgoboard@5/dist/jgoboard.umd.min.js"></script>
<script>
const board = JGO.createBoard({ size: 9 });
</script>
See it in action
SGF Viewer
Load game records, navigate branches, and display comments with a ready-made player.
Open demo →Teaching Board
Play moves, add circle/triangle/square markers, undo and redo — for interactive lessons.
Open demo →Review Tool
Create variation branches, switch between lines, and export to SGF for analysis.
Open demo →What's included
Board State
createBoard — stones, markers, queries
Game Rules
createGame — moves, captures, ko, undo
Game Tree
createGameTree — branches and cursor
SGF
parseSgf — parse and export SGF files
Renderer
createRenderer — canvas with themes
Player
createPlayer — drop-in viewer widget