> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## Versions 组件

新的 `<Versions>` 组件根据版本选择显示不同的内容。用户可以使用下拉菜单在版本之间切换，所选版本会保存在 URL 查询参数中。

**`Markdown`**

```jsx Markdown
<Versions>
  <Version version="v2.0" title="版本 2.0" default>
    版本 2.0 的内容。
  </Version>
  <Version version="v1.0" title="版本 1.0">
    版本 1.0 的内容。
  </Version>
</Versions>
```

这对于显示特定版本的文档、安装说明或 API 示例非常有用，无需复制页面。

阅读文档