Skip to content

Card Grids

Learn how to wrap multiple cards in a grid in Starlight.

To wrap multiple <Card> or <LinkCard> components in a grid, use the<CardGrid> component.

import { CardGrid } from '@astrojs/starlight/components';

Display multiple <Card> components side-by-side when there’s enough space by grouping them using the <CardGrid> component.

Display multiple <LinkCard> components side-by-side when there’s enough space by grouping them using the <CardGrid> component.

Shift the second column of the grid vertically to add visual interest by adding the stagger attribute to the <CardGrid> component.

This attribute is useful on your home page to display your project’s key features.

Implementation: CardGrid.astro

The <CardGrid> component accepts the following props:

type: boolean

Defines whether to stagger the cards in the grid or not.