Cards
Card and CardGroup components for navigation and feature highlights.
Cards are versatile components for navigation, feature lists, and content organization.
Basic Card
Card with Icon
CardGroup
Arrange cards in a grid:
Three-Column Layout
Without Description
Cards can be title-only for compact navigation:
External Links
Link to external sites:
External links open in the same tab, like internal ones.
Card Props
| Prop | Type | Description |
|---|---|---|
title | string | Card heading |
href | string | Link destination |
cta | string | Call-to-action text with a trailing arrow, pinned to the card foot so cards in a row align |
methods | string | Comma-separated HTTP methods rendered as coloured chips at the card foot, e.g. POST,GET |
eyebrow | string | Small uppercase label above the title, e.g. Guide |
icon | string | A name from the icon set below, or an emoji. An unknown name renders no icon |
children | Markdown | Description text. Optional: <Card title="..." href="..." /> is a title-only card |
CardGroup Props
| Prop | Type | Default | Description |
|---|---|---|---|
cols | 1 | 2 | 3 | 4 | auto-fit | Number of columns. Omit it to fit as many cards per row as will fit at a 16rem minimum width |
children | Card[] | — | Card components |
Available Icons
The icon prop accepts these names: alert-circle, api, arrow-right, bar-chart, bell, book, bot, box, briefcase, building, calendar, camera, chart, check, clock, cloud, code, columns, compass, cpu, credit-card, database, download, eye, file-text, fingerprint, flag, flame, folder, git-branch, github, globe, graduation-cap, hammer, heart, help, home, key, layers, layout, lightbulb, link, list-ordered, lock, mail, map, message-square, mic, monitor, package, palette, phone, play, plug, puzzle, refresh, rocket, search, send, settings, shield, signal, sliders, sparkles, star, terminal, upload, users, video, wallet, webhook, wrench, zap.
An emoji also works. Any other name renders no icon instead.
Every name in the list above draws on doc engine v1 and v2 alike — in Card,
Accordion, Step and Tab icons, <Icon>, header tab icons and page icon
frontmatter in the sidebar. v2 also draws the language glyphs typescript,
javascript, python, go, ruby, php, java, bash, shell, rust,
curl and file, and adds alert-triangle, alert-octagon, check-circle,
info, server, user, history, image, megaphone, pencil, tag and
trash, among others. An unknown name draws nothing.