Root Provider
The context provider of Hanzo Docs UI.
The context provider of all the components, including next-themes and <FrameworkProvider />. It should be located at the root layout.
Usage
Import it according to your React.js framework:
import { RootProvider } from '@hanzo/docs/ui/provider/next';
export default function Layout({ children }) {
return (
<html lang="en">
<body>
<RootProvider>{children}</RootProvider>
</body>
</html>
);
}Search Dialog
Customize or disable the search dialog with search option.
<RootProvider
search={{
enabled: false,
}}
>
{children}
</RootProvider>Learn more from Search.
Theme Provider
Hanzo Docs supports light/dark modes with next-themes.
Customise or disable it with theme option.
<RootProvider
theme={{
enabled: false,
}}
>
{children}
</RootProvider>You can also install & reference next-themes in your code for managing themes.
How is this guide?
Last updated on
