API reference - Hellenic/react-hexgrid GitHub Wiki

HexGrid

import { HexGrid } from 'react-hexgrid';

Main wrapper component to wrap all the Hexagon grid functionality.

Props:

  • width: number
  • height: number
  • viewBox: string [optional]
  • children: Layout

Layout

Component to be passed on to the HexGrid as a child. Controls the layout and orientation of the hexagons.

Props:

  • className: string [optional]
  • flat: bool [optional]
  • origin: object [optional]
  • size: object [optional]
  • spacing: number [optional]
  • children: node (See below)

Hexagon

Component to render one single hexagon. Should be placed inside Layout component for the context.

Text

Path

Pattern

Models / Tools

Hex

GridGenerator

HexUtils