Hexagon Grid

An interlocking hexagon grid gallery built with CSS clip-path, precise math using CSS variables, and interactive hover effects. Perfect for portfolios and photo galleries.

Showcase

Hexagon image

River Canyon

Nature Photography

Hexagon image

Mountain Peak

Expedition 2026

Hexagon image

Alpine Fog

Winter Series

Hexagon image

Coastal Waves

Ocean View

Hexagon image

Wilderness

Wildlife Reserve

Hexagon image

Deep Forest

Canopy Exploration

Hexagon image

Aurora

Night Sky

Hexagon image

The Journey

Urban Transit

Hexagon image

Flight

Aerial Photography

Hexagon image

Cozy Mornings

Portrait Series

Hexagon image

Barren Lands

Desert Textures

Hexagon image

Winter Solstice

Fashion Editorial

Hexagon image

Undergrowth

Macro Nature

Hexagon image

Concrete Oasis

Cityscapes

Installation

npx shadcn-extras@latest add hexagon-grid

Usage


import { HexGrid, Hexagon } from '@/components/core/hexagon-grid';
export function Example() {
return (
<HexGrid size={220} gap={16}>
<Hexagon imageSrc='/example.jpg' title='Title' subtitle='Subtitle' />
{/* ... */}
</HexGrid>
);
}

Props

HexGrid Props

PropTypeDefaultDescription
sizenumber220The width of the individual hexagon elements in pixels.
gapnumber16The spacing gap between the hexagon elements in pixels.

Hexagon Props

Accepts standard HTML div props plus:

PropTypeDefaultDescription
imageSrcstringrequiredThe source URL of the image.
imageAltstring'Hexagon image'The alt text of the image.
titleReact.ReactNodeundefinedOptional title to display inside the hexagon caption overlay.
subtitleReact.ReactNodeundefinedOptional subtitle to display inside the hexagon caption overlay.