Skip to content

Cards and columns

Link to other pages with Card, lay cards out with CardGroup or Columns, and show a preview with Tile.

Updated

A card is a box with an icon, a title and some text. Put it in a CardGroup to set the cards side by side.

MDX
<CardGroup cols={2}>
<Card title="Quickstart" icon="bolt" href="/get-started/quickstart" cta="Start">
Publish your first site.
</Card>
<Card title="Write pages" icon="file-text" href="/write/pages" horizontal>
The icon sits beside the text.
</Card>
</CardGroup>

bolt is a Font Awesome name, shown as Lucide’s zap. See icons.

A tile shows a preview, such as an image or an icon, above a title and a short description.

MDX
<CardGroup cols={2}>
<Tile title="Pages" description="MDX files in your repo" href="/write/pages">
<Icon icon="file-text" size={40} />
</Tile>
</CardGroup>
titlestring
The card’s title.
iconstring
A Lucide or Font Awesome name, or an image path.
colorstring
The icon’s color, as hex, a color name, or rgb() or hsl().
hrefstring
Makes the whole card a link.
imgstring
An image across the top of the card.
horizontalbooleandefault: false
Puts the icon beside the text.
ctastring

The call to action shown with an arrow after it. It shows only when the card has an href.

arrowbooleandefault: false
With href, shows the arrow even without a cta.

Columns is the same component as CardGroup.

colsnumberdefault: 2

Columns across, from 1 to 4. Phones always show one.

titlestring
The title under the preview.
descriptionstring
A line of text under the title.
hrefstring
Makes the whole tile a link.
Was this page helpful?

Report a problem

What’s the problem?

The docs team sees this. Other readers don’t.