Hexagon Background

An interactive hexagonal grid background with ripple effects on click.

Installation

background-ripple-effect.tsx

Props

The HexagonBackground component accepts the following props:

NameTypeDefaultDescription
hexagonSize
number75The size of each hexagon in pixels. Controls the overall scale of the hexagonal grid.
hexagonMargin
number3The margin between hexagons in pixels. Creates spacing between individual hexagon elements.
interactive
booleanfalseWhether hexagons respond to click interactions with ripple effects. When true, clicking creates animated ripples.
hexagonProps
React.ComponentProps<'div'>Additional props to pass to individual hexagon elements. Useful for custom styling or event handlers.
className
stringAdditional CSS classes to apply to the container element.
children
React.ReactNodeContent to be rendered on top of the hexagon background. Positioned absolutely within the container.