Components
Info Grid
A responsive card-based grid layout with container queries, automatic dividers, and corner rounding. Cells stack vertically on small containers and flow horizontally at @lg. Compose cell content freely with KeyIcon, Badge, text, or any custom elements.
Installation
bunx @happlyui/cli@latest add info-grid
Dependencies
Registry dependencies
These are automatically installed when you add this component.
happly-ui-utilstvkey-icon
Usage
import * as InfoGrid from "@/components/ui/info-grid"
import * as KeyIcon from "@/components/ui/key-icon"
<InfoGrid.Root>
<InfoGrid.Row>
<InfoGrid.Cell>
<KeyIcon.Root icon={<RiHeartLine />} />
<div>
<p>Label</p>
<p>Any content here</p>
</div>
</InfoGrid.Cell>
</InfoGrid.Row>
</InfoGrid.Root>
Examples
Business Profile
A mixed-layout grid with full-width rows, 3-column rows, plain text values, and wrapping badge lists.
Category
SaaS
Business name
Happly
Location
Vancouver, BC
Website
www.happly.ai
Founded
2 years
Team size
10
Business model
Industry
<InfoGrid.Root>
<InfoGrid.Row>
<InfoGrid.Cell>
<KeyIcon.Root icon={<RiHeartLine />} />
<div>
<p>Category</p>
<p>SaaS</p>
</div>
</InfoGrid.Cell>
</InfoGrid.Row>
<InfoGrid.Row>
<InfoGrid.Cell>...</InfoGrid.Cell>
<InfoGrid.Cell>...</InfoGrid.Cell>
<InfoGrid.Cell>...</InfoGrid.Cell>
</InfoGrid.Row>
</InfoGrid.Root>
Financial Data
A 3-column grid with highlighted monetary values, subtitles, and badge lists for funding history.
Annual revenue
Revenue
Annual Recurring Revenue
Monthly Recurring Revenue
Net profit
Net profit
Active clients
5
Churn trend
Decreasing
Funding history
<InfoGrid.Root>
<InfoGrid.Row>
<InfoGrid.Cell>
<KeyIcon.Root icon={<RiMoneyDollarCircleLine />} />
<div>
<p>Annual revenue</p>
<span className="text-success-dark">$34,000 CAD</span>
</div>
</InfoGrid.Cell>
</InfoGrid.Row>
</InfoGrid.Root>
Two Columns
A simple 2-column layout showing how the grid adapts to fewer cells per row.
Applicants
128
Deadline
March 31, 2026
<InfoGrid.Root>
<InfoGrid.Row>
<InfoGrid.Cell>...</InfoGrid.Cell>
<InfoGrid.Cell>...</InfoGrid.Cell>
</InfoGrid.Row>
</InfoGrid.Root>
Mobile Responsive
A narrow-width grid demonstrating single and 2-column rows for mobile layouts.
Category
SaaS
Business name
Happly
Location
Vancouver, BC
Industry
<InfoGrid.Root className="max-w-[400px]">
<InfoGrid.Row>
<InfoGrid.Cell>...</InfoGrid.Cell>
</InfoGrid.Row>
<InfoGrid.Row>
<InfoGrid.Cell>...</InfoGrid.Cell>
<InfoGrid.Cell>...</InfoGrid.Cell>
</InfoGrid.Row>
</InfoGrid.Root>
Composed Group
A composed version that renders the grid from a rows array with KeyIcon, label, and children per cell. Supports `columns` per row for CSS grid layout and `span` per item.
Category
SaaS
Business name
Happly
Location
Vancouver, BC
Website
www.happly.ai
Founded
2 years
Team size
10
Business model
<InfoGrid.Group rows={[
{
items: [
{ icon: <RiHeartLine />, label: 'Category', children: <p>SaaS</p> },
],
},
{
columns: 3,
items: [
{ icon: <RiSuitcaseLine />, label: 'Business name', children: <p>Happly</p> },
{ icon: <RiMapPinLine />, label: 'Location', children: <p>Vancouver, BC</p>, span: 2 },
],
},
]} />
API Reference
InfoGrid.Root
The card container with rounded corners, border, and shadow. Wraps content in a @container for responsive row/cell behavior.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional class names applied to the inner card element (e.g. max-w-[960px]) |
InfoGrid.Row
A responsive row of cells. Stacks vertically on small containers and switches to a horizontal layout at @lg. Automatically adds a top divider for all rows except the first.
| Prop | Type | Default | Description |
|---|
InfoGrid.Cell
An individual cell. When stacked (small), adds a bottom divider between cells. When horizontal (@lg), adds a right divider instead. Place any content as children — KeyIcon, badges, tags, text, or custom elements.
| Prop | Type | Default | Description |
|---|
InfoGrid.Group
A composed component that renders a complete grid from an array of row definitions. Each row contains items with a KeyIcon, label, and children. Supports CSS grid columns and cell spanning.
| Prop | Type | Default | Description |
|---|---|---|---|
rows | InfoGridGroupRow[] | - | Array of row definitions. Each row has `items` (with `icon`, `label`, `children`, and optional `span`) and an optional `columns` number to enable CSS grid layout. |