oakmac / chessboard2

chessboard.js v2
ISC License
81 stars 7 forks source link

How can I customize the Chessboard2 UI? #46

Closed hiayushh closed 1 year ago

hiayushh commented 1 year ago

I'd like to use Chessboard 2 for a business application. But we'd like to have the option of changing the board colors, putting custom chess pieces etc.

Is this currently possible in the project? If yes, how? Otherwise, is this something you have in plan @oakmac?

oakmac commented 1 year ago

But we'd like to have the option of changing the board colors

I intend to support changing the background color of squares via CSS (ie: not via the JS API). This is possible now by targeting the snowflaked class names in chessboard2.css. I may add additional classes to that file before v2.0.0, but I have no plans to change the definitions of classes that exist now.

putting custom chess pieces

I intend to support custom board items in chessboard2. There is some support for this already (see Example 9002), but this API may change before v2.0.0.