Free Webinar β Building for Scale with Pion & Webflow
0.1.0
Masonry Gallery
Responsive masonry grid layout for images and content.
Responsive masonry grid layout for images and content.
Features
- β Zero dependencies - Pure React implementation
- β Full accessibility - ARIA labels, keyboard navigation, screen reader support
- β Theme support - Light, dark, and auto modes
- β Reduced motion support - Respects user preferences
Props
items(required)
- Type:
GalleryItem[] | string - Gallery items (array or JSON string)
columns
- Type:
number- Default:3 - Number of columns
gap
- Type:
number- Default:16 - Gap between items (px)
theme
- Type:
'light' | 'dark' | 'auto'- Default:'auto' - Theme mode
radius
- Type:
number- Default:8 - Border radius in pixels
density
- Type:
'comfortable' | 'compact'- Default:'comfortable' - Layout density
animate
- Type:
boolean- Default:true - Enable animations
className
- Type:
string - Additional CSS class
a11yLabel
- Type:
string - Accessibility label
onItemClick
- Type:
(item: GalleryItem) => void - Click handler for items
Customization
CSS Variables
Override these variables in your Webflow custom code or CSS:
--cc-radius: 8px; /* Border radius */--cc-masonry-gap: 16px; /* Gap */Webflow Classes
Target these classes in Webflow Designer for custom styles:
.cc-masonry-gallery