Skip to content

Demo

After installing the package, you can use the component provided by starlight-package-managers in any MDX files of your Starlight documentation site.

src/content/docs/example.mdx
import { PackageManagers } from 'starlight-package-managers'
<PackageManagers pkg="astro" />

The code above generates the following commands:

Terminal window
npm i astro

Package manager tabs are also synced between each instance on the same page.

Terminal window
npm create astro@latest -- --template starlight