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
open
boolean
-
onOpenChange
(v: boolean) => void
-
children
ReactNode
-

Opens the sidebar on click.

PropTypeDefault
as
ElementType
-
Data AttributeValuesDescription
data-opentrue, falseIs sidebar opening

Last updated on

On this page

Edit on GitHub