- Updated content collections to include new schemas for better document handling. - Added new documentation files for comparisons, customization, and internationalization. - Introduced a manual installation guide and improved markdown support. - Updated package.json with new dependencies for enhanced functionality. - Added new images for documentation and improved layout components for better user experience. - Adjusted TypeScript configurations for better path management.
36 lines
697 B
Plaintext
36 lines
697 B
Plaintext
---
|
|
title: Root Toggle
|
|
description: Switch between page trees
|
|
preview: rootToggle
|
|
---
|
|
|
|
## Usages
|
|
|
|
Add this component to your sidebar or other places you want.
|
|
|
|
```tsx
|
|
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
|
|
import { RootToggle } from 'fumadocs-ui/components/layout/root-toggle';
|
|
|
|
<DocsLayout
|
|
sidebar={{
|
|
banner: (
|
|
<RootToggle
|
|
options={[
|
|
{
|
|
title: 'Folder 1',
|
|
description: 'Pages in folder 1',
|
|
url: '/path/to/page-tree-1',
|
|
},
|
|
{
|
|
title: 'Folder 2',
|
|
description: 'Pages in folder 2',
|
|
url: '/path/to/page-tree-2',
|
|
},
|
|
]}
|
|
/>
|
|
),
|
|
}}
|
|
/>;
|
|
```
|