# @cloud-ru/ds-breadcrumbs 中文文档

规范地址：https://npmcn.com/package/%40cloud-ru/ds-breadcrumbs/

版本：1\.0\.45
npm 元数据更新时间：2026-11-11T15:04:42.635Z
中文译文更新时间：2026-11-11T16:05:44.615Z
软件包许可：Apache-2\.0

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40cloud-ru/ds-breadcrumbs
原文对照：https://npmcn.com/package/%40cloud-ru/ds-breadcrumbs/?lang=original
项目主页：https://github.com/cloud-ru-tech/snack-v2/tree/master/packages/breadcrumbs
源码仓库：https://github.com/cloud-ru-tech/snack-v2

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：470 kB，151 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：5 个
- 首次发布：2026-08-18T12:41:59.307Z
- 最新版本发布：2026-11-11T15:04:42.178Z
- 近 30 天下载量：6978（2026-10-10 至 2026-11-08，npm 官方下载统计）
- 已发布版本数：176（近 12 个月 176 个）

## 中文简介

{\\fn黑体\\fs20\\shad2\\2aH82\\3aH20\\4aH33\\fscx95\\3cH592001\\be1}你觉得怎样.

## 安装

```sh
npm install @cloud-ru/ds-breadcrumbs
```

也可以使用：`pnpm add @cloud-ru/ds-breadcrumbs`、`yarn add @cloud-ru/ds-breadcrumbs`、`bun add @cloud-ru/ds-breadcrumbs`

## README

# 面包屑

`@cloud-ru/ds-breadcrumbs` -=YTET -伊甸园字幕组=- 翻译:.

Навигационная,показывающая也. {\\fn黑体\\fs20\\shad2\\2aH82\\3aH20\\4aH33\\fscx95\\3cH592001\\be1}♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪♪ `shortLabel` {\\fn黑体\\fs22\\bord1\\shad0\\3ahbe\\4ah00\\fscx67\\fscy66\\2chffffff\\3ch808080}你觉得呢.

## Демо

{/\* 客户端:只 — Droplist {} {} { { { { {}} { { { { { { { { }} { { } { { { }}} { { { { { { } { { }} { }} { } { { } } { { } { { { } } } { { { { } } { { } { } { } { } { } { { } { { } { { { } } { } { { } { } { } { } { } { } / { } { } { } { } { { { } { { }

## Когда

-   {\\fn黑体\\fs20\\shad2\\2aH82\\3aH20\\4aH33\\fscx95\\3cH592001\\be1}♪####################################################################################################################################################################################################################################.
-   В,каталогах也.
-   {\\fn方正准圆简体\\fs12\\1cHC9ECC4}我.., **не** {\\fn黑体\\fs22\\bord1\\shad0\\3ahbe\\4ah00\\fscx67\\fscy66\\2chffffff\\3ch808080}你觉得呢.

Когда **не** (原始内容存档于2018-10-29). qq: сайт 2–3 страниц, одностраничные приложения.

## Анатомия

### 大小

校对:Soup `xs` {\\fn黑体\\fs22\\bord1\\shad0\\3ahbe\\4ah00\\fscx67\\fscy66\\2chffffff\\3ch808080}我.., `s` - дефолт заголовком страницы страницы страницы.

### 项目渲染模式

说吧 `full` - полный,лейбл, `shortLabel` - , `ellipsis` - обрезан многоточием до ширины, `collapsed` {\\fn黑体\\fs20\\shad2\\2aH82\\3aH20\\4aH33\\fscx95\\3cH592001\\be1}你觉得呢? {\\fn黑体\\fs22\\bord1\\shad0\\3aHBE\\4aH00\\fscx67\\fscy66\\2cHFFFFFF\\3cH808080}你觉得呢.

## Установка

```bash
pnpm add @cloud-ru/ds-breadcrumbs
```

```ts
import { Breadcrumbs } from '@cloud-ru/ds-breadcrumbs'
```

## Примеры

### Короткая

(原始内容存档于2018-10-21). QQ.

```tsx
import { Breadcrumbs } from '@cloud-ru/ds-breadcrumbs';

const items = [
  { id: '1', label: 'Главная', href: '#' },
  { id: '2', label: 'Документы', href: '#' },
  { id: '3', label: 'Текущая страница' },
];

export function BasicTrail() {
  return <Breadcrumbs items={items} />;
}
```

### \\ \\ \\ \\ \\ \\ 短标签

{\\fn黑体\\fs22\\bord1\\shad0\\3aHBE\\4aH00\\fscx67\\fscy66\\2cHFFFFFF\\3cH808080}你还好吧.

```tsx
import { Breadcrumbs } from '@cloud-ru/ds-breadcrumbs';

const items = [
  { id: '1', label: 'Литература', href: '#' },
  { id: '2', label: 'Стихи', href: '#' },
  { id: '3', label: 'Золотой век русской поэзии', shortLabel: 'Золотой век', href: '#' },
  { id: '4', label: 'Михаил Лермонтов', shortLabel: 'Лермонтов', href: '#' },
  { id: '5', label: 'Тема "Одиночество"', shortLabel: 'Одиночество', href: '#' },
  { id: '6', label: 'Парус' },
];

export function LongTrail() {
  return <Breadcrumbs items={items} />;
}
```

### Кастомный

Разделитель.

```tsx
import { Breadcrumbs } from '@cloud-ru/ds-breadcrumbs';

const items = [
  { id: '1', label: 'Dashboard', href: '#' },
  { id: '2', label: 'Projects', href: '#' },
  { id: '3', label: 'Astro' },
];

export function CustomSeparator() {
  return <Breadcrumbs items={items} separator='/' />;
}
```

## 道具

**面包屑**

| Prop | 类型 | 默认 | 说明 |
| --- | --- | --- | --- |
| `className` | `string` | —— 说 | 支助科 |
| `data-test-id` | `string` | —— 说 |  |
| `firstItemIconOnly` | `boolean` | `false` | {\\fn黑体\\fs22\\bord1\\shad0\\3aHBE\\4aH00\\fscx67\\fscy66\\2cHFFFFFF\\3cH808080}你应该知道 {\\fn黑体\\fs22\\bord1\\shad0\\3aHBE\\4aH00\\fscx67\\fscy66\\2cHFFFFFF\\3cH808080}我.. |
| `inactiveLastItem` | `boolean` | `false` | {\\fn黑体\\fs20\\shad2\\2aH82\\3aH20\\4aH33\\fscx95\\3cH592001\\be1}你觉得呢 `href` или `onClick` |
| `items` | `Item` | —— 说 | Массив |
| `separator` | `string` | `/` | {\\fn黑体\\fs22\\bord1\\shad0\\3aHBE\\4aH00\\fscx67\\fscy66\\2cHFFFFFF\\3cH808080}你觉得呢 |
| `size` | `"s"` | `"xs"` | `s` | Размер |

#### 相关类型

**项目**

| Prop | 类型 | 默认 | 说明 |
| --- | --- | --- | --- |
| `href` | `string | undefined` | —— 说 |  |
| `icon` | `JSXElementConstructor<{ size: number; }> | undefined` | —— 说 |  |
| `id` | `string` | —— 说 |  |
| `label` | `string` | —— 说 |  |
| `onClick` | `MouseEventHandler<HTMLButtonElement | HTMLAnchorElement> | undefined` | —— 说 |  |
| `shortLabel` | `string | undefined` | —— 说 |  |

-   `Size` =: `"s"` | `"xs"`

## 常见问题

### @cloud-ru/ds-breadcrumbs 是什么？

\{\\fn黑体\\fs20\\shad2\\2aH82\\3aH20\\4aH33\\fscx95\\3cH592001\\be1\}你觉得怎样\.

### 如何安装 @cloud-ru/ds-breadcrumbs？

在项目目录运行 npm install @cloud-ru/ds-breadcrumbs，或使用 pnpm add / yarn add / bun add。

### @cloud-ru/ds-breadcrumbs 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @cloud-ru/ds-breadcrumbs 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @cloud-ru/ds-breadcrumbs 可以商用吗？

@cloud-ru/ds-breadcrumbs 使用 Apache-2\.0 许可。宽松许可：允许商业使用、修改和再分发，并附带明确的专利授权；分发时需保留许可与 NOTICE 文件，修改过的文件要注明改动。以上为概括，不构成法律意见，请以许可原文为准。

### @cloud-ru/ds-breadcrumbs 的下载量有多少？

根据 npm 官方下载统计，@cloud-ru/ds-breadcrumbs 在 2026/10/10 – 2026/11/08 这 30 天内被下载 6,978 次，日均约 233 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @cloud-ru/ds-breadcrumbs 还在维护吗？

最新版本 1\.0\.45 发布于 2026/11/11（今天）；至今共发布 176 个版本，其中过去 12 个月发布了 176 个；首次发布于 2026/08/18。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

