High-performance, accessible React chessboard UI.
MIT-licensed, compositor-based animations, refs-only dragging, and synchronous GigaChess Board96 integration.
- 🏎️ Compositor-Based Glides: GPU-accelerated Web Animations API (WAAPI) compositor animations designed to minimize main-thread work.
- 🚀 1 Commit Per Move & 0 Drag Commits: Per-byte
Uint8Array(64)subscription store viauseSyncExternalStore. Zero React re-renders while dragging pieces. - 🛡️ 100% Permissive MIT License: Engineered from the ground up as a pure React-native replacement for
chessgroundwithout restrictive GPL/AGPL viral licensing. - 🎯 Instant Synchronous Engine: Backed by
gigachess(createGigachessAdapter) — zero WASM lag, sub-millisecond frame-0 render without blank screen flashes. - ♿ First-Class Accessibility (WAI-ARIA): Roving tabindex, full keyboard navigation (arrows, Enter, Space, promotion keys), and screen-reader
LiveRegionannouncements. - 🎨 Modular Themes, Textures & Piece Sets: 22 zero-runtime themes (~205B–430B/theme) with tactile textures, SVG patterns, and independent piece outline/contrast filters for low vision, plus crisp tree-shakable pieces (~660 B per CDN set; embedded default ~2.9 kB gzipped).
- 🏹 Hardware Canvas Arrow Engine: Imperative high-DPI 2D canvas arrows, freehand gestures, knight L-shapes, and customizable highlight overlays.
- 📦 SSR & React Server Components Ready:
gigaboard/serverrenders static HTML chessboards on Node/Next.js with zero hydration mismatch and zero client JS.
💡 Pure TypeScript & Zero WASM Compile Overhead: Unlike previous engines that mandate WebAssembly compilation, Gigaboard and GigaChess run 100% synchronously. No WASM loaders, no CORS/CSP header friction, and instant SSR support across Next.js, Remix, Node, Bun, and browser workers.
# npm
npm install gigaboard
# bun
bun add gigaboard
# pnpm
pnpm add gigaboard
# yarn
yarn add gigaboardSingle-package distribution —
gigaboardincludes the interactive board (gigaboard), headless core (gigaboard/core), static SSR board (gigaboard/server), piece sets (gigaboard/pieces/*), and themes (gigaboard/themes/*) via subpath exports. Thegigachessengine ships as a bundled dependency.
Render a fully interactive chessboard with rule enforcement, move generation, and sound in just 5 lines:
import { Chessboard, useChessGame } from "gigaboard";
export function App() {
const game = useChessGame();
return <Chessboard game={game} />;
}Hook into moves, broadcast state to your server, or drive the board externally:
import { Chessboard, useChessGame } from "gigaboard";
export function OnlineGame({ initialFen, onPlayerMove }) {
const game = useChessGame({
fen: initialFen,
onMove: (move) => {
console.log(`Played ${move.san} (${move.from} → ${move.to})`);
onPlayerMove(move);
},
});
return (
<Chessboard
game={game}
orientation="white"
sound={true}
/>
);
}The cross-platform CI comparison uses validated positions in headless Chromium on Linux, Windows and macOS, at native and 4× CPU throttling. Lower task time is better.
| Workload (rank, native CPU) | Linux | Windows | macOS |
|---|---|---|---|
| Programmatic moves | 1/3 | 1/3 | 1/3 |
| Mouse dragging | 1/3 | 1/3 | 1/3 |
| Animated updates (120 ms) | 1/3 | 2/3 | 1/3 |
| Controlled FEN positions | 3/7 | 3/7 | 4/7 |
| Eight-board updates, excluding verification | 3/6 | 3/6 | 2/7 |
| Mounting | 4/7 | 4/7 | 5/7 |
Programmatic moves and mouse dragging also rank first in all six 4× and native configurations. The interactive comparison includes GigaBoard, Chessground and react-chessboard; the larger workloads include Lightsquare, cm-chessboard, chessiro and UltraChess. Incomplete first-check updates are not ranked. Lightsquare and Chessground remain faster for several controlled-rendering and mounting workloads. These are browser task timings, not input-to-photon measurements or proof of native 120 Hz performance. See Board96 migration benchmarks for paired 0.6.0 vs 0.7.0 ratios and limitations.
Earlier Chromium measurements on Apple Silicon (4× CPU throttle, 40-ply Sicilian Najdorf); not remeasured for this release:
| Feature / Metric | 🚀 Gigaboard | 📦 react-chessboard |
♟️ chessground |
|---|---|---|---|
| License | 100% MIT | MIT | |
| Architecture | Native React + Byte Store | React Component | Vanilla JS Imperative Wrapper |
| React Commits per Move | 1.00 commit | 2.83 commits | (None — imperative DOM) |
| React Work during Drag | 0 work (Refs-only) | Multiple Re-renders | 0 work |
| Engine Initialization | Instant Sync (<0.5 ms) | Slow chess.js |
Bring-Your-Own Engine |
| 100-Board Grid Memory | 45.3 MB Heap | 120.6 MB Heap (2.7× larger) | 5.7 MB Heap |
| 100-Board Grid DOM Nodes | 16,040 nodes | 53,332 nodes (3.3× more) | 15,939 nodes |
| Animation Engine | Compositor WAAPI (120fps) | CSS Transitions / rAF | Imperative Transforms |
| Arrow Engine | Single 2D Canvas Layer | SVG Elements | SVG Elements |
| WAI-ARIA Accessibility | Full (Grid, LiveRegion) | Minimal | Incomplete |
| Keyboard Move Entry | Full Keyboard Parity | Partial | Partial |
| SSR / RSC Static Board | ✅ Built-in (gigaboard/server) |
❌ None | ❌ None |
See BENCH.md for full Playwright traces, long-task observations, and memory audits.
Mix and match tree-shakable piece sets and CSS-variable themes without bundle bloat:
import { Chessboard, useChessGame } from "gigaboard";
import { cburnett } from "gigaboard/pieces/cburnett";
import { newspaper } from "gigaboard/themes/newspaper";
export function CustomBoard() {
const game = useChessGame();
return <Chessboard game={game} pieces={cburnett} theme={newspaper} />;
}Available piece sets (gigaboard/pieces/*):
neo(crisp chess.com vector style)cburnett(traditional Lichess silhouette)merida(wood-tinted tournament set)alpha(minimalist mobile silhouettes)chesscom(explicit alias for neo)giga-diagram(default; original cross-free Modern Staunton Ebony SVG pieces)
The original, self-contained Giga Diagram V5 — Modern Staunton Ebony vector set uses the same six shapes for White and Black (different palettes only). It includes a wider, cross-free king, three-point queen, short bishop cut, and refined on-board proportions.
import { gigaDiagram } from "gigaboard/pieces/giga-diagram";
<Chessboard game={game} pieces={gigaDiagram} />;The twelve raw SVG sources ship in dist/pieces-svg/giga-diagram/.
The renderer uses data URLs so it works offline without separate asset paths.
With strict CSP, allow img-src data:.
Available themes (gigaboard/themes/* — 22 tree-shakable palettes):
- Classic:
green(default chess.com),brown(tournament wood),blue(modern cool contrast),wood(warm board),chesscomGreen,chesscomBlue,ic - Textured SVG Patterns:
newspaper(vintage newsprint grain),espresso(rich dark roast grain),cafeCreme(warm cafe froth pattern) - Tactile Materials:
canvas,leather,marble,walnut,darkWood - Modern & Vibrant:
neon,olive,pink,purple - Accessibility & Low Vision:
highContrast(pure black/white + invert filter),deuteranopia(red-green safe),tritanopia(blue-yellow safe)
All themes are zero-runtime CSS custom-property dictionaries (Theme = Partial<Record<string, string>>). You can supply textured backgrounds, gradients, blend modes, and piece drop-shadows or outlines directly:
const customTheme = {
"--gb-sq-light": "#f0d9b5",
"--gb-sq-dark": "#b58863",
"--gb-sq-light-image": "radial-gradient(circle, rgba(255,255,255,0.25) 15%, transparent 16%)",
"--gb-sq-dark-image": "radial-gradient(circle, rgba(0,0,0,0.18) 15%, transparent 16%)",
"--gb-sq-image-size": "8px 8px",
"--gb-sq-blend-mode": "multiply",
"--gb-piece-filter-white": "drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45))",
"--gb-piece-filter-black": "drop-shadow(0 2px 3px rgba(0, 0, 0, 0.65))",
};
<Chessboard game={game} theme={customTheme} />Support right-click drag arrows and square highlights for streaming and analysis:
import { Chessboard, useChessGame } from "gigaboard";
export function AnalysisBoard() {
const game = useChessGame();
return (
<Chessboard
game={game}
drawable={{
enabled: true,
arrows: [
{ from: "e2", to: "e4", color: "green" },
{ from: "g1", to: "f3", color: "blue" },
],
highlights: [
{ square: "e4", color: "rgba(255, 170, 0, 0.4)" },
],
}}
/>
);
}Enable bullet and blitz players to queue premoves smoothly:
<Chessboard
game={game}
allowPremove={true}
sound={true}
haptics={true} // Optional mobile vibration feedback
/>Gigaboard is built with uncompromising accessibility compliance:
- WAI-ARIA 1.2 Grid: Correct roles (
grid,row,gridcell), roving tabindex, and coordinate indexing. - LiveRegion Move Announcer: Automatically speaks moves in Standard Algebraic Notation (SAN) to screen readers.
- Accessible Promotion Dialog: Keyboard arrow trapping, auto-focus, and screen-reader announcements.
- Custom Speech Labels: Localize square announcements via
getSquareAriaLabel.
<Chessboard
game={game}
getSquareAriaLabel={(square, cell) => `Square ${square}, ${cell ? "occupied" : "empty"}`}
onSquareFocus={(square, cell) => console.log(`Focused ${square}`)}
/>Render static chessboards on the server with zero client JavaScript and 100% hydration parity:
import { StaticChessboard } from "gigaboard/server";
export default function Page() {
return (
<main>
<h1>Puzzle of the Day</h1>
<StaticChessboard fen="r1bqk2r/pp1n1ppp/2p1pn2/3p4/2PP4/2NBPN2/PP3PPP/R1BQK2R w KQkq - 0 7" />
</main>
);
}Single gigaboard package (packages/react) with subpath exports — strict isolation, zero bundle pollution:
| Subpath | Role | Description |
|---|---|---|
gigaboard |
Primary UI | High-performance React chessboard component, hooks, WAAPI animations, and canvas arrows. |
gigaboard/core |
Headless State | Zero-DOM BoardModel, per-byte Uint8Array(64) subscription store, and gigachess adapter. No React/DOM. |
gigaboard/server |
Static SSR | Zero-JS <StaticChessboard /> for RSC with hydration parity. |
gigaboard/pieces/* |
Piece Renderers | Ultra-compact URL-based piece renderers (~660 B per CDN set; embedded default ~2.9 kB gzipped). |
gigaboard/themes/* |
Visual Themes | Zero-runtime CSS custom-property palettes (--gb-*, ~205 B/theme). |
Migration from split packages: @gigaboard/core → gigaboard/core, @gigaboard/pieces/* → gigaboard/pieces/*, @gigaboard/themes/* → gigaboard/themes/*. Runtime APIs (<Chessboard>, createGigachessAdapter, BoardModel) are unchanged.
GigaBoard integrates directly with GigaChess JS/TS for synchronous chess state and moves. For an analysis or database workstation, pair it with a Rust backend and optionally CBVault for native ChessBase data. The frontend remains usable without either backend library.
| Project | Use it for |
|---|---|
| GigaChess JS/TS | Pure JavaScript/TypeScript chess rules, move generation and game replay in browsers or Node.js |
| GigaChess Rust | Native chess rules, legal move generation and high-throughput game replay |
| GigaBoard (this library) | Accessible, high-performance React chessboard UI |
| CBVault | Read ChessBase databases and opening books, search games and export PGN |
Board96 v1 is a canonical 96-byte little-endian position format shared by GigaChess JS/TS and Rust, alongside the 16-bit moves2 encoding. A web or desktop frontend and a Rust backend can exchange compatible positions using the checked binary codecs instead of repeatedly formatting and parsing FEN. This is a wire-format contract, not a guarantee about JavaScript object size, native memory layout, network latency or compatibility with older releases.
All four projects are MIT-licensed and separately distributed. You do not need to adopt the entire stack; each package brings only its own dependencies.
Gigaboard was created as an MIT-licensed fork of ultrachess-react by Yahor Barkouski (MIT). We are deeply grateful for Yahor's original pioneering work on per-byte React chessboard subscription architectures.
Contributions and accessibility feedback are welcome. For a bug report, include a minimal React reproduction, browser and package versions, and the expected interaction or screen-reader behavior. For performance changes, provide a reproducible workload and baseline. Start with GitHub issues.
MIT © 2026 Itshak & Yahor Barkouski. Completely free for open-source, commercial, and proprietary projects.
