Breadcrumb

The navigation component at the top of screen

A hook for implementing Breadcrumb in your documentation, it returns the path to a page based on the given page tree.

If present, the index page of a folder will be used as the item

Usage

it exports a useBreadcrumb hook:

import { usePathname } from 'next/navigation';
import { useBreadcrumb } from 'fumadocs-core/breadcrumb';

const pathname = usePathname();
const 
const items: BreadcrumbItem[]
items
= useBreadcrumb(pathname, tree);
PropTypeDefault
name
string
-
url
string
-

Last updated on