Skip to content

Cards & LinkCards

Cards are structural layout elements used to highlight features, group related concepts, or guide users to subsequent articles. Starlight provides three interrelated components for this: <Card> (for static information), <LinkCard> (for navigation), and <CardGrid> (for layout alignment).

Highlight key topics or create visual landing grids using Starlight cards:

  1. Import Card: Import Card from @astrojs/starlight/components.
  2. Configure Attributes: Set a title string and an optional Starlight icon name.
  3. Add Body Text: Write brief descriptive copy inside the card tags.

Explore the live specimens, the raw markup required to build them, and instructions for authoring these components inside Sveltia CMS.

Below are examples of static feature cards and interactive link cards, both wrapped in a grid layout.


Information Architecture

Cards are excellent for introducing high-level concepts at the beginning of a section.

Visual Consistency

They utilize Starlight’s built-in icon set to maintain a uniform design language.


When utilizing cards in this knowledge base, adhere to the following stylistic rules:

  • Use the Right Card:
    • Use <Card> if the content is purely informational and the user isn’t expected to click it.
    • Use <LinkCard> if the entire purpose of the card is to route the user to another page.
  • Keep Descriptions Brief: The description prop on a <LinkCard> or the body text of a <Card> should be a maximum of two concise sentences.
  • End of Article Routing: <LinkCard> is highly recommended at the very bottom of procedural articles (under a “Next Steps” or “Related Guides” heading) to keep readers moving through the documentation.
  • Pair with Grids: Always wrap adjacent cards in a <CardGrid>. Without the grid wrapper, cards will stack at 100% width on large screens, which disrupts reading flow.