Skip to content

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

Free

Breadcrumb with Icons (Home Icon) for Ark UI

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

The root is a home icon, named Home for screen readers, with no word beside it. A folder sits beside Components. A file sits beside Breadcrumb, the current page.

Use it when the root is a home icon and later crumbs should show folder or file. A text-only trail is enough for docs. A site menu is a Navigation Menu. In React, Ark UI does not map icons to routes.

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>
        <Link aria-label="Home" href="/">
          <HomeIcon aria-hidden="true" className="size-4" />
        </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?

Components has a FolderIcon and the current page a FileTextIcon, both size-4. The link 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. Only the home link, which has no word, carries aria-label.

How is the home icon named?

The link to / holds only a HomeIcon at size-4, hidden from assistive tech, so the link carries aria-label="Home". Screen readers announce it as the Home link.

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.