A stateless React component displaying a Goban.
Its concern is the View: it implements neither Go rules nor game state.
Live demo at https://desgeeko.github.io/react-goban/
Install the package: npm install react-goban --save
Require it and use its Goban
object:
<Goban stones={{"P16":"black","Q4":"white","D4":"black","E16":"white"}}
onIntersectionClick={handler}
/>
size
= a number between9
and19
(default)theme
="classic"
(default) or"paper"
coordSystem
="A1"
(default) or"aa"
stones
= an object containing coordinates and colors as keys and valuesmarkers
= an object containing coordinates and types (for example "circle") as keys and valuesonIntersectionClick
= callback function from (statefull) parent ComponenthideBorder
= true or false (default)zoom
= an object describing the region to zoom in, or null (default)noMargin
= true or false (default)nextToPlay
= color of hover effet on placeholders
To run this demo, just download the project an run npm run start