Skip to content

API reference

Hannu Kärkkäinen edited this page May 21, 2017 · 4 revisions

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

Clone this wiki locally