# react-minesweeper

> react-minesweeper is a classic minesweeper game written as a React component. You can set the amount of fields and a bomb chance. Styles are only applied by CSS classes so it's easy to customize.

Latest version **1.0.2** (published 2018-12-11) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-12-11 |
| First published | 2018-12-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 546.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | ol-web |
| Maintainers | ol-web |
| Keywords | minesweeper, react-minesweeper, react, component |

## Links

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

## Dependencies (1)

- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-12-11
- 1.0.1 — 2018-12-11
- 1.0.0 — 2018-12-11

## README

# react-minesweeper

react-minesweeper is a classic minesweeper game written as a React component. You can set the amount of fields and a bomb chance. Styles are only applied by CSS classes so it's easy to customize.

[Link to the demo](https://ol-web.github.io/react-minesweeper/)

* * *

### Installation:

`npm install --save react-minesweeper`  

### Usage:

Import the default styling as shown in the demo page or create your own styles

```javascript
import "react-minesweeper/lib/minesweeper.css";
```

Render the component

```javascript
 <Minesweeper
    onWin={() => console.log("GAME WON")}
    onLose={() => console.log("GAME LOST")}
    bombChance={0.15} // 15% chance that a field will contain a bomb
    width={10} // amount of fields horizontally
    height={10} // amount of fields vertically
/>
```

* * *

### Is there something wrong?

Please tell me!

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