# Tabs 标签页
Tabs（标签页）是 Doks 提供的一种特殊的内容块，用于组织和展示相关内容。通过使用 Tabs，你可以将内容分成多个标签页，用户可以点击不同的标签来切换显示不同的内容，从而提升文档的可读性和用户体验。
	
{{< callout context="tip" title="Tip" icon="outline/image-generation" >}}
根据测试,无法在 Tabs 中使用  Callout 短代码.
{{< /callout >}}

你可以在 Markdown 中使用 `{{</* tabs */>}}` 和 `{{</* tab */>}}` shortcodes 来创建 Tabs。

````md
{{</* tabs "create-new-site" */>}}
{{</* tab "npm" */>}}

```bash
npm create thulite@latest
```

{{</* /tab */>}}
{{</* tab "pnpm" */>}}

```bash
pnpm create thulite@latest
```

{{</* /tab */>}}
{{</* tab "Yarn" */>}}

```bash
yarn create thulite
```

{{</* /tab */>}}
{{</* /tabs */>}}
````

{{< callout icon="outline/info-circle" >}}
在上面的示例中，我们创建了一个名为 "create-new-site" 的 Tabs，包含三个标签页，分别是 "npm"、"pnpm" 和 "Yarn"，每个标签页内都有对应的命令示例。
{{< /callout >}}

你可以根据需要创建任意数量的 Tabs 和 Tab，并在每个 Tab 中放置不同的内容。Tabs 是组织大量相关内容的绝佳方式，尤其适用于展示不同平台、工具或方法的对比信息。

{{< tabs "create-new-site" >}}
{{< tab "npm" >}}

```bash
npm create thulite@latest
```

{{< /tab >}}
{{< tab "pnpm" >}}

```bash
pnpm create thulite@latest
```

{{< /tab >}}
{{< tab "Yarn" >}}

```bash
yarn create thulite
```

{{< /tab >}}
{{< /tabs >}}

`cd` 命令可以在每个标签页中使用，用户切换标签时会保持当前的工作目录不变，这使得 Tabs 非常适合展示不同环境或工具的使用方法，而不需要担心路径问题。

{{< tabs "install-dependencies" >}}
{{< tab "npm" >}}

```bash
npm install
```

{{< /tab >}}
{{< tab "pnpm" >}}

```bash
pnpm install
```

{{< /tab >}}
{{< tab "Yarn" >}}

```bash
yarn install
```

{{< /tab >}}
{{< /tabs >}}

通过使用 Tabs，你可以更好地组织和展示内容，提升文档的可读性和用户体验。无论是展示不同工具的使用方法，还是对比不同平台的配置，Tabs 都是一个非常实用的功能。