# react-chessboard

> The React Chessboard Library

Latest version **5.12.1** (published 2026-08-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-chessboard
pnpm add react-chessboard
yarn add react-chessboard
bun add react-chessboard
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.12.1 |
| Published | 2026-08-16 |
| First published | 2015-06-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.11.0 |
| Dependencies | 2 |
| Unpacked size | 384.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 551 |
| Author | Ryan Gregory |
| Maintainers | ryangregorydev |

## Links

- npm: https://www.npmjs.com/package/react-chessboard
- Repository: https://github.com/Clariity/react-chessboard
- Homepage: https://github.com/Clariity/react-chessboard#readme
- Issues: https://github.com/Clariity/react-chessboard/issues
- npm.io page: https://npm.io/package/react-chessboard

## Dependencies (2)

- [@dnd-kit/core](https://npm.io/package/@dnd-kit/core.md) ^6.3.1
- [@dnd-kit/modifiers](https://npm.io/package/@dnd-kit/modifiers.md) ^9.0.0

## Recent versions

- 5.12.1 (latest) — 2026-08-16
- 5.9.0-beta.4 (beta) — 2026-02-10
- 2.0.6 (alpha) — 2023-01-02
- 5.12.0 — 2026-08-03
- 5.11.0 — 2026-08-01
- 5.10.0 — 2026-02-10
- 5.9.1 — 2026-02-10
- 5.9.0 — 2026-02-10
- 5.9.0-beta.3 — 2026-01-28
- 5.8.6 — 2025-11-26
- 5.8.5 — 2025-11-26
- 5.8.4 — 2025-11-12
- 5.8.3 — 2025-10-29
- 5.8.2 — 2025-10-27
- 5.8.1 — 2025-10-27
- … 104 more at https://npm.io/package/react-chessboard/versions

## README

# ♟️ React Chessboard

<div align="center">

![npm version](https://img.shields.io/npm/v/react-chessboard)
![npm downloads](https://img.shields.io/npm/dm/react-chessboard)
![license](https://img.shields.io/npm/l/react-chessboard)
![bundlesize](https://img.shields.io/bundlephobia/minzip/react-chessboard)

A modern, responsive chessboard component for React applications.

![chessboard](./docs/assets/chessboard.png)

</div>

## ✨ Features

- 🎯 Drag and drop
- 🎨 Custom pieces
- ♟️ Spare pieces
- 🎭 Custom styling
- ✨ Animation
- 📐 Custom board dimensions
- 🔄 Event handling
- 📱 Mobile support
- 📱 Responsive
- ⌨️ Accessible
- 🔷 TypeScript support
- 🛠️ Helpful utility functions
- ✨ And more!

## 📦 Installation

```bash
pnpm add react-chessboard
# or
yarn add react-chessboard
# or
npm install react-chessboard
```

## 🚀 Quick Start

```tsx
import { Chessboard } from 'react-chessboard';

function App() {
  const chessboardOptions = {
    // your config options here
  };

  return <Chessboard options={chessboardOptions} />;
}
```

## 📚 Documentation

For detailed documentation, examples, and API reference, visit our documentation site:

[📖 View Documentation](https://react-chessboard.vercel.app/)

## 🤝 Contributing

Contributions are welcome! Please read our [contribution guide](https://react-chessboard.vercel.app/?path=/docs/developers-contributing-to-react-chessboard--docs) before submitting a Pull Request.

Keen to contribute? Here is the current list of things we want to get done / are interested in adding if there is desire for it:

### Features

- **Drag and Drop Enhancements**
  - Add `dropAnimation` prop to allow override of DragOverlay dropAnimation prop that is currently set to null. This will be for animating drag overlays back to their position on failed drops for example, instead of snapping back.
- **Accessibility Improvements**
  - Review and enhance sensor implementations and accessibility.

### Documentation

- **Framework Integrations**
  - Add framework specific documentation, Next.js, Vite, Remix
  - e.g. for Next.js, include `use client` directive at the top of the component consuming the Chessboard component.

### Infrastructure

- **Testing**
  - Add test suite full of unit tests for utils and all options stories, and visual tests
- **Storybook**
  - Upgrade to Storybook 9

## Join the community of developers

Join the community of developers on the [Discord server](https://discord.gg/mTBuwNSNn5)!

Whether you're:

- building something cool with the component and want to show it off
- struggling to implement something and need some help
- have an idea for a new feature

We'd love to have you join our growing community!

## 📄 License

MIT © [Ryan Gregory](https://github.com/Clariity)

---
_Source: https://npm.io/package/react-chessboard · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
