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.
Asides
Section titled “Asides”Four variants are available: note (default), tip, caution, and danger.
Asides and Tabs combined
Section titled “Asides and Tabs combined”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:
winget install --id Git.GitClose and reopen the terminal once installation finishes.
Open Terminal and install via Homebrew:
brew install gitDon’t have Homebrew? Install it first from brew.sh.
Use your distribution’s package manager. On Debian/Ubuntu:
sudo apt update && sudo apt install gitTabs with more items
Section titled “Tabs with more items”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'));const greeting = (name: string): string => `Hello, ${name}!`;console.log(greeting('world'));def greeting(name: str) -> str: return f"Hello, {name}!"
print(greeting("world"))