Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

Breadcrumb

Displays the path to the current resource using a hierarchy of links.

Installation

npx logic2b@next add breadcrumb

Usage

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

<Breadcrumb>
  <BreadcrumbList>
    <BreadcrumbItem>
      <BreadcrumbLink href="/">Home</BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
    </BreadcrumbItem>
  </BreadcrumbList>
</Breadcrumb>

Usage notes

All parts are semantic wrappers (nav, ol, li, a, span) and forward their native props. BreadcrumbPage marks the current page with aria-current="page", and BreadcrumbEllipsis is decorative with an sr-only “More” label.

Examples

Custom separator

Pass children to BreadcrumbSeparator to swap the default chevron.

With dropdown

Collapse a middle segment into a dropdown menu for long paths.

Live playground

Edit the component props and inspect the exact JSX before copying it. The preview loads only when this section enters the viewport.

Generated JSX
<Breadcrumb
  aria-label="Project breadcrumb"
>
  <BreadcrumbList>
    <BreadcrumbItem>
      <BreadcrumbLink
        href="#"
      >Projects</BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbLink
        href="#"
      >logic2b</BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbPage>Components</BreadcrumbPage>
    </BreadcrumbItem>
  </BreadcrumbList>
</Breadcrumb>

API reference

Generated from the public TypeScript exports in src/ui/breadcrumb.tsx.

View JSON

Breadcrumb

Component
Props: React.ComponentProps<"nav">

BreadcrumbList

Component
Props: React.ComponentProps<"ol">

BreadcrumbItem

Component
Props: React.ComponentProps<"li">
Component
Props: React.ComponentProps<"a"> & { asChild?: boolean }
PropTypeRequiredDefaultDescription
asChildbooleanNo——

BreadcrumbPage

Component
Props: React.ComponentProps<"span">

BreadcrumbSeparator

Component
Props: React.ComponentProps<"li">

BreadcrumbEllipsis

Component
Props: React.ComponentProps<"span">

Accessibility contract

Machine-readable behavior and consumer responsibilities for breadcrumb.

View JSON
Support
Native semantics
Pattern
breadcrumb navigation
HTML nav/ol/li

Built-in semantics

  • Uses navigation/list semantics, aria-current=page for the current item and hides decorative separators.

Consumer responsibilities

  • Give the nav an aria-label when the page contains multiple navigation landmarks.