https://github.com/icculusc/react-hex-engine
React components and utilities for rendering SVG hexagon grids
https://github.com/icculusc/react-hex-engine
react react-components reactjs rendering-2d-graphics svg
Last synced: 9 months ago
JSON representation
React components and utilities for rendering SVG hexagon grids
- Host: GitHub
- URL: https://github.com/icculusc/react-hex-engine
- Owner: IcculusC
- License: mit
- Created: 2018-10-16T04:24:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T02:33:49.000Z (about 3 years ago)
- Last Synced: 2025-04-12T19:11:58.898Z (9 months ago)
- Topics: react, react-components, reactjs, rendering-2d-graphics, svg
- Language: JavaScript
- Homepage: https://icculusc.github.io/react-hex-engine/
- Size: 3.47 MB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/IcculusC/react-hex-engine/releases/latest)
[](https://github.com/IcculusC/react-hex-engine/tree/master)
[](https://github.com/IcculusC/react-hex-engine/pulls)
[](https://github.com/IcculusC/react-hex-engine/issues)
[](https://github.com/IcculusC/react-hex-engine/commits)
[](https://icculusc.github.io/react-hex-engine/)
# react-hex-engine
* [Installation](#installation)
* [Usage](#usage)
* [react-hex-grid](#credit) - credit where credit is due
### Installation
`yarn add react-hex-engine`
### Usage
##### Basic Example
This is the only example for now, but you can see more source in the [storybook](https://icculusc.github.io/react-hex-engine).
```
import React from "react";
import { Hexagon, HexEngine } from "react-hex-engine";
const HexMap = () => (
)
```
# Credit
Originally forked from [https://github.com/Hellenic/react-hexgrid](https://github.com/Hellenic/react-hexgrid)
Quote from the original readme
> React components to build interactive hexagons grids and games. It uses SVG which makes it fast, scalable and easy to apply custom styles. You can easily customize the layout of the grid just by configuration.
>
> Component-based approach allows you to customize the grid shape to suit your needs or even apply your own components / SVG elements to it. You can use pre-defined generator to create certain shape grid or you may build totally your own grid to the shape you wish, while still keeping it under control and interactive.
>
> You could easily use this library to build (just to name a few) a nice portfolio, image library or even a game!
>
> With inspiration from
[http://www.redblobgames.com/grids/hexagons](http://www.redblobgames.com/grids/hexagons).