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

KbqBreadcrumbItem

componentСкопировать ссылку на 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 routerLink: RouterLink | null;
    readonly customTemplateRef: Signal<TemplateRef<unknown> | undefined>;
}
textinputСкопировать ссылку на textstring

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

disabledinputСкопировать ссылку на disabledboolean

Indicates whether the breadcrumb item is disabled.

currentinputСкопировать ссылку на 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.

customTemplateRefСкопировать ссылку на 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

componentСкопировать ссылку на 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-labelinputСкопировать ссылку на 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.

firstItemNegativeMargininputСкопировать ссылку на firstItemNegativeMarginboolean

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

sizeinputСкопировать ссылку на sizeKbqDefaultSizes

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

maxinputСкопировать ссылку на 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.

disabledinputСкопировать ссылку на disabledboolean

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

wrapModeinputСкопировать ссылку на wrapModeKbqBreadcrumbsWrapMode

Wrapping behavior of the breadcrumb items.

dirinputСкопировать ссылку на 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.

loopinputСкопировать ссылку на loopboolean

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

localeOverridesinputСкопировать ссылку на localeOverridesKbqPartialLocaleData | undefined

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

KbqBreadcrumbButton

directiveСкопировать ссылку на 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 {}
focusableinputСкопировать ссылку на 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

directiveСкопировать ссылку на KbqBreadcrumbsSeparator
@Directive({ selector: 'ng-template[kbqBreadcrumbsSeparator]' })
class KbqBreadcrumbsSeparator {
    readonly templateRef: TemplateRef<unknown>;
}

KbqBreadcrumbView

directiveСкопировать ссылку на 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

typeСкопировать ссылку на KbqBreadcrumbsConfiguration
type KbqBreadcrumbsConfiguration = {
    max: number | null;
    size: KbqDefaultSizes;
    firstItemNegativeMargin: boolean;
    wrapMode: KbqBreadcrumbsWrapMode;
};
maxСкопировать ссылку на 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.
firstItemNegativeMarginСкопировать ссылку на firstItemNegativeMarginboolean

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

wrapModeСкопировать ссылку на 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

typeСкопировать ссылку на KbqBreadcrumbsWrapMode
type KbqBreadcrumbsWrapMode = 'auto' | 'wrap' | 'none';

KbqRovingFocusOrientation

typeСкопировать ссылку на KbqRovingFocusOrientation

Axis a roving-focus group navigates along.

type KbqRovingFocusOrientation = 'horizontal' | 'vertical';

KBQ_BREADCRUMBS_CONFIGURATION

constСкопировать ссылку на KBQ_BREADCRUMBS_CONFIGURATION

Breadcrumbs options global configuration provider.

const KBQ_BREADCRUMBS_CONFIGURATION: InjectionToken<KbqBreadcrumbsConfiguration>;

kbqBreadcrumbsConfigurationProvider

constСкопировать ссылку на kbqBreadcrumbsConfigurationProvider

Utility provider for KBQ_BREADCRUMBS_CONFIGURATION.

const kbqBreadcrumbsConfigurationProvider: (
    configuration: Partial<KbqBreadcrumbsConfiguration>
) => Provider;
Предложения по улучшению
Если вы нашли ошибку или хотите доработать статью, создайте запрос на GitHub.