prmbr-image-mksaas/content/docs/components/root-toggle.zh.mdx
javayhu fe04a2973e feat: add new documentation files for zh locale
- Introduced multiple new MDX files covering various topics including comparisons, customization, internationalization, manual installation, markdown usage, and component documentation.
- Enhanced the overall structure and organization of the documentation to improve user experience and accessibility.
- Added a meta JSON file to define the documentation structure and navigation.
- Implemented new layout files for different document types, improving the flexibility of the documentation framework.
2025-04-01 00:38:07 +08:00

35 lines
729 B
Plaintext

---
title: 根切换器
description: 在页面树之间切换
preview: rootToggle
---
## 使用方法
将此组件添加到您的侧边栏或您想要的其他地方。
```tsx
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
import { RootToggle } from 'fumadocs-ui/components/layout/root-toggle';
<DocsLayout
sidebar={{
banner: (
<RootToggle
options={[
{
title: '文件夹 1',
description: '文件夹 1 中的页面',
url: '/path/to/page-tree-1',
},
{
title: '文件夹 2',
description: '文件夹 2 中的页面',
url: '/path/to/page-tree-2',
},
]}
/>
),
}}
/>;
```