Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Breadcrumb examples · Standard

Breadcrumb with Border (Standard) for React

A breadcrumb trail with a text Home link inside a rounded border that hugs its content.

Framework
UI library

A trail that reads as its own module: Home, Components and the current page inside a rounded border. Use it on dashboards and busy layouts where an inline trail would blend into the surrounding UI. The border sits on Breadcrumb itself, so nothing else wraps it.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

How is the border applied?

Breadcrumb takes w-fit rounded-lg border px-3 py-2. The nav becomes the box, and w-fit keeps it only as wide as the trail instead of the full row.

How is the trail announced?

Breadcrumb renders a nav labeled breadcrumb around an ordered list, so screen readers announce a breadcrumb landmark and the number of items. Home and Components are read as links.

Which separator sits between the crumbs?

An empty BreadcrumbSeparator renders a chevron, hidden from assistive tech.

Does the box react on hover?

No. Only the links change, to the foreground color. The border and padding belong to the nav, which isn't a control.

Can I give the box a fill?

Add a token class such as bg-muted or bg-card next to the border classes. Keep it light so the links keep their contrast.

How do the links go through my router?

BreadcrumbLink takes the link through render, as in render={<Link href="/" />} with the Next.js Link.