---
title: Breadcrumb 面包屑
description: 带分隔符的页面祖先路径。
---

面包屑展示当前页所在位置。条目间以 chevron 图标分隔；最后一项（无
`href`）渲染为当前页。

## 两层

```ts
breadcrumb([
  { name: '首页', href: '/' },
  { name: '贡献' },
]);
```

## 三层

```ts
breadcrumb([
  { name: '首页', href: '/' },
  { name: '贡献', href: '/zh/contribution/overview/' },
  { name: '组件文档', href: '/zh/contribution/components/' },
  { name: 'Callout 提示框' },
]);
```

## 参数

<PropsTable
  labels={{ prop: '参数', type: '类型' }}
  type={{
    name: { type: 'string', description: '显示名。' },
    href: { type: 'string', description: '链接目标；最后一项（当前页）省略。' },
  }}
/>

## 注意

- 容器为 `<nav aria-label="Breadcrumb">`；当前页使用
  `.cpd-breadcrumb-current`（非链接）。
- 真实文档页的 `PageTitle` 覆盖组件会从侧边栏树自动渲染该面包屑。
