Moons
Io, Europa, Ganymede
To display content in a box matching Starlight's styles, use the <Card> component.
Moons
Io, Europa, Ganymede
import { Card } from '@astrojs/starlight/components';
Display a card using the <Card> component and provide a title for the card.
import { Card } from '@astrojs/starlight/components';
<Card title="Check this out">Interesting content you want to highlight.</Card>
{% card title="Check this out" %}
Interesting content you want to highlight.
{% /card %}
Check this out
Interesting content you want to highlight.
Include an icon in a card using the icon attribute set to the name of one of Starlight's built-in icons.
import { Card } from '@astrojs/starlight/components';
<Card title="Stars" icon="star">
Sirius, Vega, Betelgeuse
</Card>
{% card title="Stars" icon="star" %}
Sirius, Vega, Betelgeuse
{% /card %}
Stars
Sirius, Vega, Betelgeuse
Display multiple cards side-by-side when there's enough space by grouping them using the <CardGrid> component.
See the "Group cards" guide for an example.
<Card> PropsImplementation: Card.astro
The <Card> component accepts the following props:
titlerequired
type: string
The title of the card to display.
icontype: string
A card can include an icon attribute set to the name of one of Starlight's built-in icons.