Fumadocs

Sidebar

The navigation bar at aside of viewport

A sidebar component which handles device resizing and remove scroll bar automatically.

Usage

import * as Base from 'fumadocs-core/sidebar';
 
return (
  <Base.SidebarProvider>
    <Base.SidebarTrigger />
    <Base.SidebarList />
  </Base.SidebarProvider>
);
PropTypeDefault
children
ReactNode
-
onOpenChange?
((v: boolean) => void)
-
open?
boolean
-

Opens the sidebar on click.

PropTypeDefault
as?
ElementType
-
Data AttributeValuesDescription
data-opentrue, falseIs sidebar opening
PropTypeDefault
removeScrollOn?
string
-
as?
ElementType
-
blockScrollingWidth?
number
-

How is this guide?

On this page