# react-hexagon-grid

> React Hexagon Grid

Latest version **1.1.1** (published 2019-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-hexagon-grid
pnpm add react-hexagon-grid
yarn add react-hexagon-grid
bun add react-hexagon-grid
```

## 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.1.1 |
| Published | 2019-07-16 |
| First published | 2018-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Gabriele Vassallo |
| Maintainers | gvassallo |
| Keywords | react, react-component, hexagon, hexagon-grid, grid, svg |

## Links

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

## Dependencies (1)

- [react-hexagon](https://npm.io/package/react-hexagon.md) ^1.1.3

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2019-07-16
- 1.1.0 — 2019-04-05
- 1.0.1 — 2018-03-29
- 1.0.0 — 2018-03-28

## README

# react-hexagon-grid

React component that renders a fully adaptable grid of flat-topped hexagons using SVG. The
component fills the container with the hexagons, adapting their size properly.

![react-hexagon-grid.gif](https://thumbs.gfycat.com/FrigidDisloyalFinch-size_restricted.gif)

## Installation

`react-hexagon-grid` can be installed using [npm](https://npmjs.org/):

```
npm install --save react-hexagon-grid
```

## Basic usage

```javascript
import React from 'react';
import HexagonGrid from 'react-hexagon-grid';

const hexagons = [... /* Put your content here */];

React.render(
  <HexagonGrid
    gridWidth=300
    gridHeight=200
    hexagons={hexagons}
  />,
  document.getElementById('root')
);
```

See the [demo](./demo/) for a working example.

## Props

* `gridWidth`              - The width, in pixel, of the grid (**required**)
* `gridHeight`             - The height, in pixel, of the grid (**required**)
* `hexagons`               - An array of hexagon objects (**required**)
* `renderHexagonContent`   - A function to render the content of each hexagon
* `hexProps`               - The props that will be assigned to each hexagon

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

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