TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/shuding/nextra/llms.txt
Use this file to discover all available pages before exploring further.
Cards component renders a responsive grid of clickable cards, each linking to an internal or external URL. Cards work well for navigation hubs, feature showcases, and related-content sections. Each individual card is exposed as Cards.Card so the two are always imported together from a single named export.
Import
Props
<Cards>
| Prop | Type | Default | Description |
|---|---|---|---|
num | number | 3 | Number of columns in the grid. |
className | string | — | Additional CSS class names for the grid container. |
<Cards.Card>
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | Required. The card heading text. |
href | string | — | Required. The URL the card links to. Supports Next.js <Link>. |
icon | ReactElement | — | A React element rendered before the title — typically an SVG icon. |
arrow | boolean | false | When true, appends an animated → to the title on hover. |
children | ReactNode | — | Optional content (such as an image) rendered above the title row. |
className | string | — | Additional CSS class names for the card. |
Usage
Basic Grouped Cards
Wrap multiple<Cards.Card> elements in a <Cards> container to produce a uniform grid layout.
Cards with Icons
Pass any React element to theicon prop to display it at the start of the card title row. You can import your own SVG icons or use a third-party icon library.
Card with Arrow
Thearrow prop adds a right-arrow indicator that translates slightly on hover, providing a clear affordance that the card is a link.
Controlling Column Count
Use thenum prop on <Cards> to override the default three-column layout.
Cards with Images
Provide achildren element — typically a Markdown image — to display a visual above the card title. The card automatically switches to a richer elevated style when children are present.
Wrapping the image in a React fragment (
<>…</>) prevents MDX from treating it as a direct child paragraph, which avoids unwanted margin or padding from prose styles.Single Standalone Card
A<Cards.Card> used outside a <Cards> wrapper is rendered without the grid, useful for a single prominent call-to-action link.