Card

Use Card when a link needs more context than inline text. Cards can be plain and text-focused, or they can include a generated cover for a more visual entry point.

<Card  title="Quickstart"  href="/documentation/getting-started/quickstart"  icon="lucide:rocket"  cover={{    icon: "lucide:sparkles",    glass: true,    colors: ["#fb7185", "#fb923c"],    patternSeed:"d"  }}>  Build and publish your first docs site.</Card>

Basic usage

The title prop is required. Add an href when the card should link somewhere, and use the card body for the optional description.

<Card title="API reference" href="/configure-with-docs-json/api-reference">  Configure your API reference pages, navigation, and schemas.</Card>

The description supports Markdown, so you can include emphasis, inline code, and links.

<Card title="Content model" href="/getting-started/content-model">  Learn how `docs.json`, MDX pages, and reusable components work together.</Card>

Add an icon

Use icon for a small icon next to the title and description. This is useful for compact cards that should still have a clear visual anchor.

<Card  title="Format text"  href="/edit-markdown/format-text"  icon="lucide:type">  Use Markdown syntax for headings, lists, links, and emphasis.</Card>

Add a cover

Use cover when the card should have a visual header. A cover is shown when either cover.icon or cover.text is set.

Add cover content

<Card  title="Model routing"  href="/edit-markdown/components/tabs"  cover={{    icon: "lucide:network",    text: "Routing",  }}>  Create a more visual card for important guides or landing pages.</Card>

Add glass

Add glass: true to place the cover icon and text in a subtle glass-like surface.

<Card  title="Launch checklist"  href="/getting-started/quickstart"  cover={{    icon: "lucide:circle-check",    text: "Ready",    glass: true,  }}>  Give featured cards a softer, more dimensional cover treatment.</Card>

Customize cover colors

cover.colors accepts one to four hex colors. If you provide fewer than four colors, the remaining colors are generated automatically.

<Card  title="Brand guidelines"  href="/configure-with-docs-json/branding"  cover={{    text: "Colors",    colors: ["#fb6f61", "#f6b44b", "#38c7b5"],  }}>  Start with your brand colors and let the card generate the rest.</Card>

Use colorSeed to change the generated palette when fewer than four colors are provided.

<Card  title="Brand guidelines"  href="/configure-with-docs-json/branding"  cover={{    text: "Colors",    colors: ["#fb6f61", "#f6b44b", "#38c7b5"],    colorSeed: "123",  }}>  Keep the same brand color while tuning the generated palette.</Card>

Change the cover pattern

Use patternSeed when the title-generated pattern does not have the composition you want. This changes the cover pattern without changing the card title or colors.

<Card  title="Brand guidelines"  href="/configure-with-docs-json/branding"  cover={{    text: "Pattern",    colors: ["#fb6f61", "#f6b44b", "#38c7b5"],    patternSeed: "abc",  }}>  Keep the same title and colors while tuning the cover composition.</Card>

Add a button

Use button when the card should include a separate call to action. When button is set, the button uses button.href, and the title still uses href if one is provided.

API reference

Review every available API reference configuration option.

Open reference
<Card  title="API reference"  button={{    text: "Open reference",    href: "/configure-with-docs-json/api-reference",  }}>  Review every available API reference configuration option.</Card>

You can customize the button color for a single card with light and dark mode variation.

<Card  title="Branding"  button={{    text: "Open branding",    href: "/configure-with-docs-json/branding",    color: {      light: "#059669",      dark: "#FF692E",    },  }}>  Adjust colors, logos, and other visual settings.</Card><Card  title="Branding"  button={{    text: "Open branding",    href: "/configure-with-docs-json/branding",    color: "#2E90FA",  }}>  Adjust colors, logos, and other visual settings.</Card>

Site-wide defaults

Set card defaults in docs.json when you want the same cover palette or button color across the site. Card-level props take precedence over these defaults.

{  "theme": {    "card": {      "cover": {        "colors": ["#fb7185", "#fb923c"],        "colorSeed": "abc"      },      "button": {        "color": {          "light": "#171717",          "dark": "#f5f5f5"        }      }    }  }}

Cover colors are resolved in this order: cover.colors, theme.card.cover.colors, theme.themeColor, then the built-in palette. colorSeed only changes generated colors, so it has no effect when all four cover colors are set explicitly.

Button colors are resolved in this order: button.color, theme.card.button.color, navbar.primary.color, then the default neutral button style.

Props

PropTypeDescription
titlestringRequired. The card title.
hrefstringOptional link target. If no button is set, the whole card becomes a link. Uses the same internal, external, and OpenAPI endpoint link rules as MDX links.
iconstringOptional icon shown next to the title and description.
coverobjectOptional visual cover configuration. The cover appears when cover.icon or cover.text is set.
buttonobjectOptional call-to-action button configuration.
childrenMarkdownOptional description content shown below the title.

Cover props

PropTypeDescription
iconstringIcon shown in the center of the cover.
textstringText shown in the center of the cover.
glassbooleanAdds a subtle glass surface around the cover icon and text.
colorsstring[]One to four hex colors used for the cover. Missing colors are generated automatically.
patternSeedstringChanges the generated cover pattern without changing the title.
colorSeedstringChanges generated colors when fewer than four cover colors are provided.

Button props

PropTypeDescription
textstringRequired when button is set. The button label.
hrefstringRequired when button is set. The button link target. Uses the same link rules as card href.
colorstring or
{ light?: string; dark?: string }
Optional button color. Use a hex string for one color, or separate light and dark colors.