A library for displaying lists as honeycombs with hexagonal cells in React applications
npm install react-honeycomb``bash`
npm install react-honeycomb
Alternatively, if you're using yarn, run:
`bash`
yarn add react-honeycomb
Currently the library provides two kinds of Honeycomb components: Honeycomb (a.k.a Static Honeycomb) and ResponsiveHoneycomb.
Honeycomb component generates a grid with a given number of columns regardless of the available space. It's suitable for the cases when you're sure about how many columns you are going to need or you want to have control over the responsiveness by manipulating the columns prop with your own rules.
`jsx
import { Honeycomb, Hexagon } from 'react-honeycomb';
size={SIZE_OF_HEXAGON_SIDE}
items={MY_ITEMS}
renderItem={(item) => (
renderItem(item)
)}
/>
`
ResponsiveHoneycomb component tries to fit as many columns as its container allows by attaching a ResizeObzerver to the container element (which results in a possible performance overhead). It would suit you if you need to fill all available horizontal space with the list items.
`jsx
import { ResponsiveHoneycomb, Hexagon } from 'react-honeycomb';
size={SIZE_OF_HEXAGON_SIDE}
items={MY_ITEMS}
renderItem={(item) => (
renderItem(item)
)}
/>
``