react-chessboard-ui
v1.0.0
Published
A customizable and interactive chessboard component for React applications. Easily integrate a fully functional and responsive chessboard into your React project with features like drag-and-drop pieces, move validation, and customizable board styles.
Downloads
84
Maintainers
Readme
react-chessboard-ui
See full documentation on https://chessboardui.space
Install
npm install react-chessboard-ui
or
yarn add react-chessboard-ui
Usage example
import React from 'react';
import { ChessBoard } from 'react-chessboard-ui'; // ChessBoard is a base component of react-chessboard-ui
import 'react-chessboard-ui/dist/index.css'; // required import css for ChessBoard
export const App = () => {
// ... all handlers
return (
<div>
<ChessBoard
FEN="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
onChange={handleChangePosition}
onEndGame={handleEndGame}
/>
</div>
);
}
Creators
Created by in: Tanya and in: Alex