Sidebar
Navigation sidebar with collapsible folders
Documentation sidebar with search, navigation sections, and collapsible folders.
Usage
Navigation structure
Flat items
Simple list of pages:
Collapsible folders
Nested sections that can collapse:
Mixed
Combine doc items with explicit items and folders:
Icons
Add icons to items and folders:
Icons appear in the collapsed view and next to items in the expanded view.
Collapsible sidebar
Enable icon-only collapsed mode with the collapsible prop:
When collapsed:
- Shows only the toggle button
- Navigation items show icons only
- Expands on hover
Auto-expand folders
Expand folders automatically to a certain depth:
Folders at depth 1 or less will be expanded by default.
Clickable folders
Folders can also be links:
Clicking the folder title navigates to the href. The expand/collapse button is separate.
Props
| prop | type | default | description |
|---|---|---|---|
| title | string | required | Site title |
| logo | ReactNode | - | Site logo |
| navigation | SidebarSection[] | required | Nav structure |
| basePath | string | "/docs" | Base URL path |
| github | string | - | GitHub repo link |
| collapsible | boolean | false | Enable collapse toggle |
| defaultOpenLevel | number | 0 | Auto-expand folders to depth |