Skip to content

Tabs

Tabs group alternatives. Give related tab groups the same syncKey and choosing a tab in one switches the others, so a reader picks their package manager once.

import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs syncKey="pkg">
<TabItem label="npm">
```bash
npm install
```
</TabItem>
<TabItem label="pnpm">
```bash
pnpm install
```
</TabItem>
</Tabs>
Terminal window
npm install

A second group with the same syncKey follows the first:

Terminal window
npm run build

Tabs can hold any content, not just code.

No sign-in. Your data lives in .knetik/local/. Answers only on this machine.