HextaUI

Breadcrumb: With icons

Icons sit inside links and the current page. Give an icon-only link an aria-label.

import { IconFolder, IconHome } from "@tabler/icons-react"

import {
  Breadcrumb,
  BreadcrumbItem,
  BreadcrumbLink,
  BreadcrumbList,
  BreadcrumbPage,
  BreadcrumbSeparator,
} from "@/components/ui/breadcrumb"

export function BreadcrumbWithIcons() {
  return (
    <Breadcrumb>
      <BreadcrumbList>
        <BreadcrumbItem>
          <BreadcrumbLink href="#" aria-label="Home">
            <IconHome />
          </BreadcrumbLink>
        </BreadcrumbItem>
        <BreadcrumbSeparator />
        <BreadcrumbItem>
          <BreadcrumbLink href="#">
            <IconFolder />
            Projects
          </BreadcrumbLink>
        </BreadcrumbItem>
        <BreadcrumbSeparator />
        <BreadcrumbItem>
          <BreadcrumbPage>
            <IconFolder />
            hextaui
          </BreadcrumbPage>
        </BreadcrumbItem>
      </BreadcrumbList>
    </Breadcrumb>
  )
}

This adds the example as components/examples/breadcrumb/with-icons.tsx, together with the Breadcrumb component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/breadcrumb-with-icons.json

To add only the component, follow the Breadcrumb installation.

Props in this example

The Breadcrumb props this example sets, from the API reference.

PropTypeDefault
href
string–

Every prop is in the Breadcrumb API reference.

See them all, with keyboard support and accessibility notes, on the Breadcrumb page.