Skip to main content
Version: 1.0.2

ResponsiveGrid

Overview

The ResponsiveGrid component allows developers to build responsive grid layouts declaratively, without writing media queries.
It supports dynamic column counts across breakpoints, configurable gaps, equal-height items, and animations.

Preview

Item 1
Item 2
Item 3
Item 4

Installation

npx @mindfiredigital/ignix-ui add responsive-grid

Variants

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6

Usage

Basic Example

function ProductGrid() {
return (
<ResponsiveGrid
columns={{ mobile: 1, tablet: 2, desktop: 3 }}
gap="large"
>
<ProductCard />
<ProductCard />
<ProductCard />
</ResponsiveGrid>
);
}
function Gallery() {
return (
<ResponsiveGrid
columns={{ mobile: 2, tablet: 3, desktop: 5 }}
gap="small"
animation="stagger"
>
{images.map((src, i) => (
<img key={i} src={src} className="rounded shadow" />
))}
</ResponsiveGrid>
);
}

Props

PropTypeDefaultDescription
columns{ mobile?: number, tablet?: number, desktop?: number }{}Defines column counts for each breakpoint.
gap"small" | "normal" | "large" | string"normal"Gap between grid items.
minItemWidthstring"auto"Minimum width of each grid item before wrapping.
equalHeightbooleanfalseEnsures all items in a row have equal height.
animation"none" | "fade" | "stagger" | "scale""none"Defines animation for layout changes.