import { KbqBreadcrumbsModule } from '@koobiq/components/breadcrumbs';

KbqBreadcrumbItem

componentCopy link to KbqBreadcrumbItem

Component represents an individual breadcrumb item with optional support for router navigation and styling.

@Component({ selector: 'kbq-breadcrumb-item' })
class KbqBreadcrumbItem {
    readonly text = input<string>('');
    readonly disabled = input<boolean>(false);
    readonly current = input<boolean>(false);
    readonly customTemplateRef: Signal<TemplateRef<unknown> | undefined>;
    readonly routerLink: RouterLink | null;
}
textinputCopy link to textstring

The text displayed for the breadcrumb item. This text will be shown if breadcrumb item is hidden in dropdown.

disabledinputCopy link to disabledboolean

Indicates whether the breadcrumb item is disabled.

currentinputCopy link to currentboolean

Indicates whether the breadcrumb item is the current/active item, which the trail exposes as aria-current="page". The last item of a trail is current regardless of this input.

customTemplateRefCopy link to customTemplateRefSignal<TemplateRef<unknown> | undefined>

A reference to a custom template provided for the breadcrumb item content. The template can be used to override the default appearance of the breadcrumb.

KbqBreadcrumbs

componentCopy link to KbqBreadcrumbs
@Component({ selector: 'kbq-breadcrumbs,[kbq-breadcrumbs]' })
class KbqBreadcrumbs {
    readonly ariaLabel = input<string | null>(null, {
        alias: 'aria-label'
    });
    readonly firstItemNegativeMargin = input<boolean>(
        this.configuration.firstItemNegativeMargin
    );
    readonly size = input<KbqDefaultSizes>(this.configuration.size);
    readonly max = input<number | null>(this.configuration.max);
    readonly disabled = input<boolean>(false);
    readonly wrapMode = input<KbqBreadcrumbsWrapMode>(
        this.configuration.wrapMode
    );
}
aria-labelinputCopy link to aria-labelstring | null

Accessible name of the navigation landmark. Set it whenever a page renders more than one trail, so assistive technology can tell them apart. Left unset, the name comes from the active locale.

firstItemNegativeMargininputCopy link to firstItemNegativeMarginboolean

Determines if a negative margin should be applied to the first breadcrumb item. The default comes from KbqBreadcrumbsConfiguration.

sizeinputCopy link to sizeKbqDefaultSizes

Size of the breadcrumbs. Affects font size. Default value is taken from the global configuration.

maxinputCopy link to maxnumber | null

Maximum number of visible breadcrumb items. Remaining items are collapsed into a dropdown if the total exceeds this value. Default value is taken from the global configuration.

disabledinputCopy link to disabledboolean

Indicates whether the breadcrumbs are disabled. When disabled, every item and the expand button stop navigating and leave the tab order.

wrapModeinputCopy link to wrapModeKbqBreadcrumbsWrapMode

Wrapping behavior of the breadcrumb items.

dirinputCopy link to dirDirection | null

Reading direction the arrow keys are mapped against, written onto the host as dir. Left unset, no attribute is emitted — the element inherits the document direction, and the key mapping follows the ambient CDK Directionality.

loopinputCopy link to loopboolean

Whether the arrow keys wrap around, from the last item to the first and back.

localeOverridesinputCopy link to localeOverridesKbqPartialLocaleData | undefined

Localized strings for this element and its subtree, keyed by locale section. Every key is optional at every depth.

KbqBreadcrumbButton

directiveCopy link to KbqBreadcrumbButton

Directive to style and configure buttons used as breadcrumb items.

  • Takes part in the roving focus of KbqBreadcrumbs: the arrow keys move between the items.
  • Optionally injects KbqButton to customize its style for breadcrumb usage.
  • Sets type="button" on a <button> host, so a breadcrumb never submits a surrounding form.
@Directive({ selector: '[kbq-button][kbqBreadcrumb]' })
class KbqBreadcrumbButton {}
focusableinputCopy link to focusableboolean

Whether the item takes part in the roving focus. The arrow keys skip an item that does not, and a click does not focus it.

KbqBreadcrumbsSeparator

directiveCopy link to KbqBreadcrumbsSeparator
@Directive({ selector: 'ng-template[kbqBreadcrumbsSeparator]' })
class KbqBreadcrumbsSeparator {
    readonly templateRef: TemplateRef<unknown>;
}

KbqBreadcrumbView

directiveCopy link to KbqBreadcrumbView

Directive provides a way to define a custom template for breadcrumb rendering, leveraging TemplateRef

@Directive({ selector: '[kbqBreadcrumbView]' })
class KbqBreadcrumbView {
    readonly templateRef: TemplateRef<unknown>;
}

KbqBreadcrumbsConfiguration

typeCopy link to KbqBreadcrumbsConfiguration
type KbqBreadcrumbsConfiguration = {
    max: number | null;
    size: KbqDefaultSizes;
    firstItemNegativeMargin: boolean;
    wrapMode: KbqBreadcrumbsWrapMode;
};
maxCopy link to maxnumber | null

Specifies the maximum number of breadcrumb items to display.

  • If a number is provided, only that many items will be shown.
  • If null, no limit is applied, and all breadcrumb items are displayed.
firstItemNegativeMarginCopy link to firstItemNegativeMarginboolean

Determines if a negative margin should be applied to the first breadcrumb item.

wrapModeCopy link to wrapModeKbqBreadcrumbsWrapMode

Manages breadcrumb items when space is limited:

  • auto: Adjusts based on space and item count.
  • wrap: Moves items to the next line if needed.
  • none: Prevents wrapping, allowing overflow.

KbqBreadcrumbsWrapMode

typeCopy link to KbqBreadcrumbsWrapMode
type KbqBreadcrumbsWrapMode = 'auto' | 'wrap' | 'none';

KbqRovingFocusOrientation

typeCopy link to KbqRovingFocusOrientation

Axis a roving-focus group navigates along.

type KbqRovingFocusOrientation = 'horizontal' | 'vertical';

KBQ_BREADCRUMBS_CONFIGURATION

constCopy link to KBQ_BREADCRUMBS_CONFIGURATION

Breadcrumbs options global configuration provider.

const KBQ_BREADCRUMBS_CONFIGURATION: InjectionToken<KbqBreadcrumbsConfiguration>;

kbqBreadcrumbsConfigurationProvider

constCopy link to kbqBreadcrumbsConfigurationProvider

Utility provider for KBQ_BREADCRUMBS_CONFIGURATION.

const kbqBreadcrumbsConfigurationProvider: (
    configuration: Partial<KbqBreadcrumbsConfiguration>
) => Provider;
Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.