You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chessground is a React Wrapper package for the original [Chessground](https://github.com/ornicar/chessground) UI developed for [lichess.org](https://lichess.org). This project also contains zero chess logic, please visit [chess.js](https://github.com/jhlywa/chess.js) for validation/generation.
5
4
6
-
This package is in very early stages of development, thus usage of this package in TypeScript is highly recommended.
5
+
This package is in early stages of development, thus usage of this package in TypeScript is highly recommended.
7
6
8
7
## Installation
9
8
10
-
Currently the package has `peerDependencies` on `react: ^16.8.0` and `react-dom: ^16.8.0`.
9
+
Currently the package has `peerDependencies` on `react: ^16.8.0 || ^17.0.0 || ^18.0.0` and `react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0`.
After installing, the component can be default imported and it has 4 optional props:
23
22
24
-
-`width: number` defaults to `900`, determines width of the chessboard in pxs
25
-
26
-
-`height: number` defaults to `900`, determines height of the chessboard in pxs
27
-
28
-
-`config: Partial<Config>` defaults to `{}`, determines various [configuration properties](https://github.com/ornicar/chessground/blob/master/src/config.ts#L7-L90) of Chessground
29
-
30
-
-`contained: boolean` defaults to `false`, when enabled renders the chessboard in a `100%` width & height div.
23
+
-`width: number` defaults to `900`, determines width of the chessboard in pxs
24
+
25
+
-`height: number` defaults to `900`, determines height of the chessboard in pxs
26
+
27
+
-`config: Config` defaults to `{}`, determines various [configuration properties](https://github.com/ornicar/chessground/blob/master/src/config.ts#L7-L90) of Chessground
28
+
29
+
-`contained: boolean` defaults to `false`, when enabled renders the chessboard in a `100%` width & height div.
31
30
32
31
Renders a simple `900 x 900` board, with pieces in their default position:
0 commit comments