You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React component to create interactive hexagons grids. It uses SVG so it works fastand can be styled easily, and it is flexible to customize.
10
+
React components to build interactive hexagons grids. 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.
11
11
12
-
With inspiration from
12
+
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.
13
+
14
+
You could easily use this library to build (just to name a few) a nice portfolio, image library or even a game!
*[HexUtils.js](https://github.com/Hellenic/react-hexgrid/tree/master/src/HexUtils.js), Static methods for calculating distance, checking neighboring tiles, etc.
* props : Object [optional] { text: String, image: String, className: String } The `className` can be used to style individual hexagons via CSS.
79
+
TODO
118
80
119
81
## Examples
120
82
121
83
See examples folder.
122
84
123
85
### Basics
124
86
125
-
1.[basic-board](https://github.com/Hellenic/react-hexgrid/tree/master/examples/basic-board)- Just simple render of HexGrid
126
-
1.[grid-types](https://github.com/Hellenic/react-hexgrid/tree/master/examples/grid-types) - All the different grid types and their configurations
127
-
1.[tile-events](https://github.com/Hellenic/react-hexgrid/tree/master/examples/tile-events) - HexGrid with action functions passed down. Just logs to console when different events are triggered.
128
-
1.[custom-grid](https://github.com/Hellenic/react-hexgrid/tree/master/examples/custom-grid) - Custom generated Hexagon grid and tile content
129
-
130
-
## Advanced
131
-
132
-
1.[pathfinding](https://github.com/Hellenic/react-hexgrid/tree/master/examples/pathfinding) - HexGrid with pathfinding between tiles and highlighting certain hexagons
133
-
1.[drag & drop](https://github.com/Hellenic/react-hexgrid/tree/master/examples/drag-and-drop) - 2 HexGrids with possibility to drag hexagons from grid to another
87
+
1.[react-hexgrid](https://github.com/Hellenic/react-hexgrid/tree/master/examples/hexgrid-v1) - Basic usage of react-hexgrid
134
88
135
89
## Testing changes locally
136
90
You can test changes by importing the library directly from a folder:
0 commit comments