Starlight components

David Morales David Morales
/

Usage

Display a link prominently using the LinkCard component. Each LinkCard requires a title and an href attribute.

Add a short description to a link card using the description attribute.

Display multiple LinkCard components side-by-side when there is enough space by grouping them using the CardGrid component.

Aside

Usage

Starlight provides a custom syntax for rendering asides in Markdown and MDX as an alternative to the Aside component.

Use custom titles

Override the default aside titles by using the title attribute.

Advanced uses

With folded content:

Used as a FAQ:

Usage

Use the LinkButton component to display a visually distinct call-to-action link. A link button is useful for directing users to the most relevant or actionable content and is often used on landing pages.

Get started

Optionally, customize the appearance of the link button using the variant attribute, which can be set to primary (the default) or secondary.

Configuration Reference

Include an icon in a link button using the icon attribute set to the name of one of Starlight’s built-in icons.

The iconPlacement attribute can be used to place the icon before the text by setting it to start (defaults to end).

Starlight icons

Steps

Usage

Use the Steps component to style numbered lists of tasks. This is useful for more complex step-by-step guides where each step needs to be clearly highlighted.

Wrap Steps around a standard Markdown ordered list. All the usual Markdown syntax is applicable inside Steps.

  1. First item
  2. Second item
  3. Third item

With embedded components

  1. First item with a code snippet

    import { Steps } from '@astrojs/starlight/components';
  2. Second item with an aside

Tabs

Usage

Display a tabbed interface using the Tabs and TabItem components. Each TabItem must have a label to display to users.

Sirius, Vega, Betelgeuse

Sync tabs

Keep multiple tab groups synchronized by adding the syncKey attribute.

All Tabs on a page with the same syncKey value will display the same active label. This allows your reader to choose once (e.g. their operating system or package manager), and see their choice persisted across page navigations.

To synchronize related tabs, add an identical syncKey property to each Tabs component and ensure that they all use the same TabItem labels:

Some stars:

Bellatrix, Rigel, Betelgeuse

Some exoplanets:

HD 34445 b, Gliese 179 b, Wasp-82 b

Add icons to tabs

Include an icon in a tab item using the icon attribute set to the name of one of Starlight’s built-in icons to display an icon next to the label.

Sirius, Vega, Betelgeuse