Hoppa till innehåll

Asides and tabs

This page shows how Starlight’s ::: directives (asides) and <Tabs> can be combined in a guide scenario — for example when installation instructions differ by operating system.


Four variants are available: note (default), tip, caution, and danger.


A common pattern on the course site is combining an aside with <Tabs> for platform-specific instructions. Students only see the steps relevant to their own operating system, without having to scroll past irrelevant content.

Open PowerShell as administrator and run:

Terminal window
winget install --id Git.Git

Close and reopen the terminal once installation finishes.


Tabs work just as well for presenting code alternatives across languages or frameworks. Use syncKey on multiple <Tabs> blocks that represent the same choice, so the selection stays in sync across the page.

const greeting = (name) => `Hello, ${name}!`;
console.log(greeting('world'));
CCBY