Warning
This is an ESM-only package.
import { createPlayer } from "@gi-tcg/webui";
// Inject a player chessboard with IO
const io0 = createPlayer(document.querySelector("#player0"), 0);
// Acquire a show-only standalone chessboard (using Web Component)
const chessboard = document.createElement("gi-tcg-standalone-chessboard");
chessboard.stateData = /* ... */;
document.body.append(chessboard);
A live example can be found here.