JGuang / JGuang UI
Components组件Radix UIRadix UI 组件

Breadcrumb

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

Partially translated: Chinese navigation, titles, descriptions, and common headings. The technical body is currently in English.
Loading JGuang UI example…

Installation

Command

Manual

Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.

Copy and paste the following code into your project.

View complete source: components/ui/breadcrumb.tsx

Update the import paths to match your project setup.

Usage

import {
  Breadcrumb,
  BreadcrumbItem,
  BreadcrumbLink,
  BreadcrumbList,
  BreadcrumbPage,
  BreadcrumbSeparator,
} from "@/components/ui/breadcrumb"
<Breadcrumb>
  <BreadcrumbList>
    <BreadcrumbItem>
      <BreadcrumbLink href="/">Home</BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbLink href="/components">Components</BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
    </BreadcrumbItem>
  </BreadcrumbList>
</Breadcrumb>

Composition

Use the following composition to build a Breadcrumb:

Breadcrumb
└── BreadcrumbList
    ├── BreadcrumbItem
    │   └── BreadcrumbLink
    ├── BreadcrumbSeparator
    ├── BreadcrumbItem
    │   └── BreadcrumbLink
    ├── BreadcrumbSeparator
    └── BreadcrumbItem
        └── BreadcrumbPage

Basic

A basic breadcrumb with a home link and a components link.

Loading JGuang UI example…

Custom separator

Use a custom component as children for `` to create a custom separator.

Loading JGuang UI example…

You can compose with a to create a dropdown in the breadcrumb.

Loading JGuang UI example…

Collapsed

We provide a `` component to show a collapsed state when the breadcrumb is too long.

Loading JGuang UI example…

To use a custom link component from your routing library, you can use the asChild prop on ``.

Loading JGuang UI example…

RTL

To enable RTL support in JGuang UI, see the RTL configuration guide.

Loading JGuang UI example…

API Reference

The Breadcrumb component is the root navigation element that wraps all breadcrumb components.

PropTypeDefault
classNamestring-

The BreadcrumbList component displays the ordered list of breadcrumb items.

PropTypeDefault
classNamestring-

The BreadcrumbItem component wraps individual breadcrumb items.

PropTypeDefault
classNamestring-

The BreadcrumbLink component displays a clickable link in the breadcrumb.

PropTypeDefault
classNamestring-

The BreadcrumbPage component displays the current page in the breadcrumb (non-clickable).

PropTypeDefault
classNamestring-

The BreadcrumbSeparator component displays a separator between breadcrumb items. You can pass custom children to override the default separator icon.

PropTypeDefault
childrenReact.ReactNode-
classNamestring-

The BreadcrumbEllipsis component displays an ellipsis indicator for collapsed breadcrumb items.

PropTypeDefault
classNamestring-

Source: components/radix/breadcrumb.mdx

Technical documentation for JGuang UI.

On this page