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 { useBreadcrumb } from 'fumadocs-core/breadcrumb'

const tree: PageTree = ...
const pathname = usePathname()

const items = useBreadcrumb(pathname, tree)
PropTypeDescription
namestringName of item
urlstring | nullHref link

Last updated on