Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Global Navigation

  • Navbar
  • BeianFooter
  • Brand
  • AppLauncher
  • Sidebar
  • NavMenu
  • NavigationMenu
  • Menu
  • Menubar
  • Dock
  • BubbleMenu
  • CardNav
  • FlowingMenu
  • GooeyNav
  • PillNav
  • StaggeredMenu

In-page Navigation

  • RouteTabs
  • Tabs
  • Breadcrumb
  • Pagination
  • Anchor
  • Affix
  • BackTop
  • Stepper
  • Steps
  • PageHeader

Actions and Tools

  • Command
  • ContextMenu
  • Toolbar
  • Accordion
  • Collapsible
  • Link
  • AnimatedThemeToggler

Breadcrumb

breadcrumb

Shows a static page hierarchy with a semantic current-page marker.

Usage

Basic usage

Pass in the items array (from the root to the current page). The last item defaults to the current page and cannot be clicked.

  1. Home
  2. /
  3. Components
  4. /
  5. Breadcrumbs
tsx
<Breadcrumb
  items={[
    { label: "Home", href: "/" },
    { label: "Component", href: "/components" },
    { label: "Breadcrumbs" },
  ]}
/>

Custom separator

separator accepts any ReactNode (character or icon), the default is "/", and the separator is automatically added with aria-hidden.

  1. Home
  2. Components
  3. Breadcrumbs
tsx
<Breadcrumb items={items} separator={<ChevronIcon />} />

Unclickable middle term

href that omits an item is rendered as neutral plain text (non-navigable ancestor) and is still not the current page.

  1. Home
  2. /
  3. Archive
  4. /
  5. 2026 Annual Report
tsx
<Breadcrumb
  items={[
    { label: "Home", href: "/" },
    { label: "Archive" },
    { label: "2026 Annual Report" },
  ]}
/>

Long path automatic line wrapping

Automatically wrap lines in a narrow container when there are a large number of items, and use the chevron separator to make it clearer.

  1. Home
  2. Documentation
  3. Design System
  4. Navigation Family
  5. Breadcrumb component
  6. Accessibility Semantics
tsx
<div className="max-w-xs">
  <Breadcrumb items={longPath} separator={<ChevronIcon />} />
</div>

Client-side routing (render slot)

render turns the item into the element you pass (next/link, react-router Link), merging the skin and aria-current into it. It is not click hijacking, so Cmd+click to open a new tab, middle-click and the rest keep working.

  1. Customers
  2. /
  3. Zhang San
tsx
<Breadcrumb
  items={[
    { label: "Customers", render: <Link href="/customers" /> },
    { label: "Zhang San" }, // the current page omits render, so it stays non-clickable
  ]}
/>

When to use

Use Breadcrumb to show the current page's position in the site hierarchy and provide links back through each ancestor, for example Home / Components / Breadcrumb. Use Tabs to switch peer content in one region, Pagination to move through pages, or Stepper for an ordered process.

Import

ts
import { Breadcrumb } from "@hulianui/ui"

Props

NameTypeDefaultDescription
items*BreadcrumbItem[]-Path entries ordered from the root to the current page.

BreadcrumbItem

NameTypeDefaultDescription
label *ReactNode-Displayed content.
hrefstring-Link destination. Omitting it renders a non-interactive item, such as the current page or an ancestor without its own destination.
currentboolean-Explicitly marks the current page; when no item sets it, the final entry is current.
renderReactElement-Render the entry as a custom element (next/link, the react-router Link, and so on). The skin classes and aria-current are merged into that element, and label becomes its children.

Slots

SlotTypeDescription
separatorReactNodeSeparator between entries. Defaults to "/"; alternatives such as a chevron are automatically marked decorative with aria-hidden.

Example

tsx
<Breadcrumb
  items={[
    { label: "Home", href: "/" },
    { label: "Components", href: "/components" },
    { label: "Breadcrumb" }, // Final item without href is the current page
  ]}
/>

With a chevron separator:

tsx
<Breadcrumb items={items} separator={<ChevronIcon />} />

Wiring up a client router (Next.js, react-router) through the same render contract used by Button, Link, and NavMenuItem:

tsx
<Breadcrumb
  items={[
    { label: "Customers", render: <Link href="/customers" /> },
    { label: "Zhang San" }, // The final entry is the current page; leave render off to keep it non-interactive
  ]}
/>

Usage guidelines

  • An intermediate item without href renders as non-interactive text, which is useful for an ancestor such as Archives that has no standalone page.
  • Avoid a bare href inside a single-page app, because it triggers a full page load. Pass the framework's Link through render instead: the element is really rendered rather than having its clicks hijacked on the <nav>, so Cmd+click to open a new tab, middle click, and Shift+click all keep working without hand-written modifier checks.
  • An entry that sets render always uses it: even the current page renders as that element, only with aria-current="page" added. Leave render off the final entry when the current page should stay non-interactive. href normally comes from the element itself; when the entry also sets href, the entry wins.
  • Class merge order matches the other render slots in the library: the component's own skin classes come first and the className on the render element comes last, so the latter wins.

Related

Tabs · Pagination · Anchor · Affix · BackTop · Stepper

Playground

  1. Home
  2. /
  3. Components
  4. /
  5. Breadcrumbs
<Breadcrumb items={items} />
PreviousTabsNavigationNextPagination

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Slots
    • Example
    • Usage guidelines
    • Related
  • Playground