Layout
The layout of documentation
The layout of documentation pages, it must be nested under the Root Provider.
It is a server component, you should not reference it in a client component.
Usage
Wrap the children and pass your page tree to the component.
Prop | Type | Default |
---|---|---|
tree | Root | - |
sidebar | Partial<SidebarOptions> | - |
containerProps | HTMLAttributes<HTMLDivElement> | - |
links | LinkItem[] | - |
nav | Partial<NavOptions> | - |
children | ReactNode | - |
Non-docs Pages
If you want to share navbar and search dialog between other pages, you may use the Layout
component for non-docs page.
It doesn't contain a sidebar, therefore, a page tree is not required.
You can create a Route Group to share the same layout across multiple pages.
Navbar
Prop | Type | Default |
---|---|---|
enabled | boolean | - |
component | ReactNode | - |
githubUrl | string | - |
title | ReactNode | - |
children | ReactNode | - |
url | string | '/' |
links | NavLinkProps[] | - |
transparentMode | "always" | "top" | "none" | none |
Sidebar
Prop | Type | Default |
---|---|---|
enabled | boolean | - |
component | ReactNode | - |
collapsible | boolean | - |
footer | ReactNode | - |
defaultOpenLevel | number | 1 |
banner | ReactNode | - |
Last updated on