Компонент Breadcrumbs для Angular | ng-hub-ui-breadcrumbs

Компонент breadcrumbs для Angular с интеграцией с Router, пользовательскими шаблонами, поддержкой RTL и гибкими токенами стилизации.

Интерактивные примеры

Изучите живые примеры, показывающие, как библиотека ведёт себя в типичных сценариях использования Angular.

Базовые хлебные крошки

Базовые хлебные крошки

Цепочка, считанная прямо из конфигурации маршрутов, без дополнительной настройки.

Items are generated from the data.breadcrumb configuration of active routes.

Код

Динамические хлебные крошки

Динамические хлебные крошки

Подписи, собранные из подстановки в маршруте и данных, которые вернул его resolver.

The last crumb comes from a route declaring breadcrumb: "Dynamic: {name}", resolved with that route's data. This page has no router tree, so the demo is handed the resulting trail — the route configuration is in the TS tab.

Код

Свои шаблоны

Свои шаблоны

Возьмите разметку каждого элемента на себя с помощью шаблона hubBreadcrumbItem.

The hubBreadcrumbItem directive allows custom rendering of each element.

Код

Иконки в цепочке

Иконки в цепочке

Иконки, объявленные в данных маршрута и отрисованные своим шаблоном элемента.

Код

Раскладка RTL

Раскладка RTL

Поддержка письма справа налево: разделитель стоит с той стороны, откуда идёт цепочка.

Код

Усечение и тултип

Усечение и тултип

Обрезает длинную подпись многоточием и показывает полный текст при наведении.

Each label is capped at --hub-breadcrumb-max-item-width (12rem). Only the items that overflow get a tooltip.

Код

Сворачивание длинных цепочек

Six crumbs, no collapsing — the default

maxItems = 4 — one crumb each side of the indicator

maxItems = 4 with two crumbs kept on each side

Indicator opened 0 time(s) — that is the collapsedClick output. The trail expands on its own and collapses again on the next navigation.

Кольцо фокуса клавиатуры

Default ring — press Tab to walk the trail

Re-tinted ring on the same markup

The ring reaches the collapsed indicator too, which is a button and therefore part of the tab order. Note where the overrides live: the focus tokens are declared on :host, so a value set on an ancestor never reaches them — put it on the <hub-breadcrumb> element or inside it. (The accent slot is the one exception, left undeclared on purpose so it does inherit.)

Цепочка как сигнал

INV-2026-0184

in Invoices · 5 levels deep

The heading and the crumbs are two readings of the same signal. Only the trail changes when you move; neither the header nor the component is told anything.