Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Breadcrumb with Icons (Standard) for Ark UI

A breadcrumb with a folder icon beside Home and Components, and a file icon beside the current page, Breadcrumb.

Each crumb pairs an icon with its word. A folder sits beside Home and beside Components. A file sits beside Breadcrumb, the current page, which is not a link.

Use it in a file manager or a content tool that mixes folders and documents. Drop the icons if the words are already clear. A site menu is a Navigation Menu. In React, Ark UI does not pick the icons.

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.
Use email insteadNo credit card

Anatomy

Breadcrumb anatomy: link, ellipsis, separator, item, page

Usage

<Breadcrumb>
  <BreadcrumbList>
    <BreadcrumbItem>
      <BreadcrumbLink asChild className="flex items-center gap-1.5">
        <Link href="/">
          <FolderIcon aria-hidden="true" className="size-4" />
          Home
        </Link>
      </BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbLink asChild className="flex items-center gap-1.5">
        <Link href="/components">
          <FolderIcon aria-hidden="true" className="size-4" />
          Components
        </Link>
      </BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbPage className="flex items-center gap-1.5">
        <FileTextIcon aria-hidden="true" className="size-4" />
        Breadcrumb
      </BreadcrumbPage>
    </BreadcrumbItem>
  </BreadcrumbList>
</Breadcrumb>

FAQ

How are the icons paired with the text?

Home and Components each have a FolderIcon, the current page a FileTextIcon, all size-4. The links and the page take flex items-center gap-1.5, so icon and word sit on one line.

Do the icons need labels?

No. The words beside them already name each crumb, so the icons are hidden from assistive tech.

How do I pick the icon for each level?

From the kind of each level in your data: a folder for a section, a file for a document. Keep the mapping fixed so the same kind always shows the same icon.

Which separator sits between the crumbs?

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

Why isn't the last crumb a link?

BreadcrumbPage is the page you are on. It renders text with aria-current="page", so it is announced as the current page and has nowhere to go.

How do the links go through my router?

BreadcrumbLink takes asChild, and the demo puts the Next.js Link inside it. Put your router's link there instead.

API Reference

Breadcrumb

Sets asChild. The rest is on the Breadcrumb page.