根提供者
Fumadocs UI 的上下文提供者。
所有组件的上下文提供者,包括next-themes和上下文
用于搜索对话框。它应该位于根布局。
用法
import { RootProvider } from 'fumadocs-ui/provider';
export default function Layout({ children }) {
return (
<html lang="en">
<body>
<RootProvider>{children}</RootProvider>
</body>
</html>
);
}搜索对话框
使用 search 选项自定义或禁用搜索对话框。
<RootProvider
search={{
enabled: false,
}}
>
{children}
</RootProvider>从Search]了解更多信息。
主题提供商
Fumadocs 通过 next-themes 支持亮/暗模式。
使用 theme 选项自定义或禁用它。
<RootProvider
theme={{
enabled: false,
}}
>
{children}
</RootProvider>
AI Magic 3D文档