Next.js Discord

Discord Forum

What is the best practice way to build breadcrumb in Next.js App router mode ?

Unanswered
Iridescent shark posted this in #help-forum
Open in Discord
Iridescent sharkOP
As the title says, I'm using the App Router in Next.js. Unlike the Pages Router, there’s no central router config file - which means there’s no built-in data source for automatically generating breadcrumbs.
For example, frameworks like Ant Design Pro (Umi) provide a route config that makes this easy.
So, what is the recommended pattern for handling breadcrumbs in Next.js with the App Router? Most tutorials show breadcrumb components inside individual pages, but I need a breadcrumb component inside a layout ( like the second image ), and it doesn’t work as expected.

4 Replies

Pacific sand lance
parallel route + catchAll
https://ui.shadcn.com/docs/components/breadcrumb
I also recommend checking out this
Iridescent sharkOP
❤️ thank you guys. I have done it with Parallel route with catch all. I will check other solutions your guys recommend as well