Docs
LayoutLayout
The layout of documentation
The layout of documentation pages, it must be nested under the Root Provider.
Usage
Wrap the children and pass your page tree to the component.
Navbar
Prop | Type | Default |
---|---|---|
enabled | boolean | true |
component | ReactNode | - |
title | ReactNode | - |
url | string | / |
items | NavItemProps[] | - |
githubUrl | string | - |
Shared Navbar
It is common to share a navbar across all the pages.
To achieve this, you may disable the default navbar and place your own instead.
The default navbar is exported from next-docs-ui/component
, you can add it to
the root layout (under the root provider).
Sidebar
Prop | Type | Default |
---|---|---|
enabled | boolean | true |
banner | ReactNode | - |
footer | ReactNode | - |
component | ReactNode | - |
collapsible | boolean | true |
defaultOpenLevel | number | 1 |
Example
app/docs/[[...slug]]/layout.tsx
Last updated on