The CardGrid component arranges Card components in a responsive grid. It supports 2 or 3 column layouts and collapses gracefully on smaller screens.
---
import CardGrid from "astro-theme-university/components/CardGrid.astro";
import Card from "astro-theme-university/components/Card.astro";
---
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
columns | 2 | 3 | 3 | Number of columns in the grid. |
The component accepts a default slot, intended for Card components.
Examples#
3-column grid (default)
Installation
Get up and running in minutes.
Configuration
Customise the theme to suit your site.
Deployment
Publish your site to the web.
2-column grid
Components
Pre-built UI components for common patterns.
Layouts
Page-level templates with nav, footer, and content areas.
Notes#
While CardGrid is designed to work with Card components, it will accept any
content in its slot. The grid uses CSS to handle responsive behaviour — cards
will stack to a single column on narrow viewports regardless of the columns
setting.