Information Architecture
Cards are excellent for introducing high-level concepts at the beginning of a section.
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:
Card from @astrojs/starlight/components.title string and an optional Starlight icon name.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.
Notice how <CardGrid> automatically handles the responsive column layout. The stagger prop (e.g., <CardGrid stagger>) can also be added to offset the second column visually.
### Static Feature Cards<CardGrid> <Card icon="open-book" title="Information Architecture"> Cards are excellent for introducing high-level concepts at the beginning of a section. </Card>
<Card icon="star" title="Visual Consistency"> They utilize Starlight's built-in icon set to maintain a uniform design language. </Card></CardGrid>
### Navigation Link Cards<CardGrid> <LinkCard description="Learn the philosophy behind Git-backed documentation." href="/philosophy/docs-as-code/" title="Explore the Docs-as-Code Guide"/>
<LinkCard description="See all available icons you can use inside cards." href="https://starlight.astro.build/guides/components/#icons" title="View Starlight Icon Reference"/></CardGrid>How writers add this component using the Sveltia CMS interface.
In Rich Text Mode (Visual LinkCard):
In Raw Markdown Mode (CardGrid & Layouts):
<CardGrid> to open the multi-column layout block.<Card> or <LinkCard> tags inside the grid.</CardGrid>.Pro Tip: For
<LinkCard>, you can link to relative internal pages (e.g.,href="/components/steps/") or external URLs (e.g.,href="https://github.com").
For a complete visual walkthrough of inserting Link Cards in Sveltia CMS, see Inserting Custom Components (CMS Magic).
When utilizing cards in this knowledge base, adhere to the following stylistic rules:
<Card> if the content is purely informational and the user isn’t expected to click it.<LinkCard> if the entire purpose of the card is to route the user to another page.description prop on a <LinkCard> or the body text of a <Card> should be a maximum of two concise sentences.<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.<CardGrid>. Without the grid wrapper, cards will stack at 100% width on large screens, which disrupts reading flow.