Skip to content

Breadcrumb

Download .md

A breadcrumb shows the path from a section to the current page, and links each step back.

  • Use it on pages two or more levels deep, such as the metadata of one release.
  • Put it above the page title. The Detail pattern shows it in place.
  • Don’t use it on top-level pages; the sidebar already says where you are.
React
Vue
123
  1. 1Link to a parent page
  2. 2Separator
  3. 3Current page

Links in text-sm text-muted-foreground, separated by a 14px chevron. The current page is the last item, in text-foreground font-medium, and is not a link. Below sm, collapse the middle levels into an ellipsis.

There is one style.

React Vue Flutter Type Default Use
BreadcrumbLink href BreadcrumbLink href ShadBreadcrumbLink onPressed link none A parent page.
BreadcrumbPage BreadcrumbPage Text text none The current page, not a link.
BreadcrumbSeparator BreadcrumbSeparator separator element chevron The mark between steps.
BreadcrumbEllipsis BreadcrumbEllipsis ShadBreadcrumbEllipsis element none Stands for hidden middle levels.
import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from "@/components/ui/breadcrumb"
export default function BreadcrumbDemo() {
return (
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink href="#">Rilis</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbLink href="#">Senja di Kota</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>Ubah metadata</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
)
}
Terminal window
npx shadcn@latest add https://design.sosialoka.tech/r/react/breadcrumb.json
  • The breadcrumb is a nav named “breadcrumb”, with the steps in an ordered list.
  • The current page has aria-current="page".
  • Separators are hidden from screen readers.