Developer Programs

Learn

Docs

Breadcrumbs

Components > Content Layout > Breadcrumbs
Use this component to...
Show the user where they currently are in the view hierarchy, allowing them to link to any higher level in the view hierarchy

Overview

Complex applications often allow users to drill down from more general views into increasingly more detailed views. As the user drills downward through the hierarchy of views, they can quickly lose track of where they are in the process and may find it difficult to return to a higher level in the hierarchy of views.

Because of this, we want to ensure two things:

  • The user understands where they are in the hierarchy of views.
  • The user can quickly return to higher levels in the hierarchy of views.

Breadcrumbs are a great way to accomplish both of these goals without requiring much space in your view.

We support two types of breadcrumbs:

  • Simple breadcrumbs perform an action when clicked, typically a navigation back up to a higher level in the navigation tree. Most breadcrumbs are the simple variety.
  • Dropdown breadcrumbs display a dropdown menu when clicked. Each item in the dropdown menu perform an action when clicked, typically a navigation over to an adjacent level in the navigation tree.

Breadcrumbs are a horizontal list of links displayed at the top of the view, above the function title. Breadcrumbs include a segment for each level in a hierarchy of views. This hierarchy may start at the root of your application’s tree of views, or it may reflect only a local hub. The segments indicate the hierarchy from left-to-right, with more general views on the left and more specific views on the right. Each segment is separated by a delimiter character.

Every breadcrumb segment is a link to a higher level in the hierarchy. This helps the user to quickly jump back to higher levels in the hierarchy of views. The function title identifies the current view, which is the lowest level of the hierarchy. The title is not a link. It helps the user understand where they are in the overall process.

Breadcrumbs are not a replacement for your app’s primary navigation.

If there are multiple paths through your app’s navigation tree down to the current page, the breadcrumbs should only display one path down to this page, regardless of how the user navigated here.

Breadcrumbs display a static link to the current location in your app’s hierarchical structure, not the user’s browsing history.

Do not use breadcrumbs in parts of your application where there is no hierarchy, since there is nothing to link back to in these sections.

On mobile devices, avoid wrapping in your breadcrumbs since this uses up valuable vertical space at the top of the view. If you notice wrapping, try shortening the text of individual breadcrumb segments or reduce the depth of the breadcrumbs to only a couple of levels up from the current view. This is not as much of a concern for larger screen widths since there is generally more room for the breadcrumbs to spread out.

While less common, breadcrumbs are also supported within a display block. Breadcrumbs at this level don’t navigate from the current view to another view; instead, they are used for controlling navigation for local drill-down operations that take place fully within a display block. Breadcrumbs at the display block level should appear at the top of the display block, below the display block title and toolbar.

While breadcrumbs at the function view level show all levels in the hierarchy except for the last — the function title acts as the last breadcrumb — breadcrumbs at the display block level are not tied to the display block title and should include all levels of the hierarchy.


Development

Web component development

Component reference

rui-breadcrumbs
rui-breadcrumbs
Module: rui-layout - Package: @jkhy/responsive-ui-wc

Container for rui-breadcrumb elements

NameTypeDefaultDescription
slotstring''Set to function-breadcrumbs to arrange breadcrumb above page title in function view.
rui-breadcrumb
rui-breadcrumb
Module: rui-layout - Package: @jkhy/responsive-ui-wc

Breadcrumb element to show each level of hierarchy. Use this for each breadcrumb at either the function view level or at the display block level.

NameTypeDefaultDescription
textstring''Text displayed in the breadcrumb
routestring''

If the breadcrumb links to a view within the app, assign the route for that view to this attribute.

You must prefix the route with “/#” in Angular applications.

rui-clickeventIf the breadcrumb executes code when clicked, define a rui-click event handler for it.
isClickablebooleantrueSpecifies whether the breadcrumb is clickable or not. You should leave this at its default value of true other than very rare cases where a breadcrumb provides contextual info but isn’t clickable.
rui-breadcrumb-dropdown
rui-breadcrumb-dropdown
Module: rui-layout - Package: @jkhy/responsive-ui-wc

Breadcrumb that displays a dropdown menu when pressed.

NameTypeDefaultDescription
textstring''Text displayed in the breadcrumb
rui-button-menu-option
rui-button-menu-option
Module: rui-buttons - Package: @jkhy/responsive-ui-wc

Option in dropdown menu.

NameTypeDefaultDescription
textstring''Text displayed in the dropdown option
isDisabledbooleanfalseSpecifies whether the dropdown option is disabled.
routestring''

If the dropdown option links to a view within the app, assign the route for that view to this attribute.

You must prefix the route with “/#” in Angular applications.

rui-menu-option-clickeventIf the dropdown option executes code, define a rui-click event handler for it.
rui-button-menu-separator
rui-button-menu-separator
Module: rui-buttons - Package: @jkhy/responsive-ui-wc

Separator between groups of options in a dropdown menu

No properties or events

Implementation

Begin by importing the rui-layout module into your application.

Import the module
// import into app.module
import '@jkhy/responsive-ui-wc/components/rui-layout/rui-layout-imports';

For breadcrumbs at the function view level, nest instances of rui-breadcrumb within the rui-breadcrumbs tag.

Do not include the lowest level of the hierarchy for breadcrumbs at the function view level, since the function view title acts as the final breadcrumb in the hierarchy.

Breadcrumb example
<rui-function-view titleText="Customer Search">

    <!-- Breadcrumbs at the function view level -->
    <rui-breadcrumbs slot="function-breadcrumbs">
        <rui-breadcrumb text="Home" route="/#/Home"></rui-breadcrumb>
    </rui-breadcrumbs>

</rui-function-view>

Most breadcrumbs perform a simple navigation when clicked. But breadcrumbs that link from one “spoke” to another in drill-down navigation scenarios display a dropdown menu of all available sibling spoke navigation options when clicked.

Breadcrumb dropdown example
<rui-breadcrumbs slot="function-breadcrumbs">

    <rui-breadcrumb text="Home" route="/#/Home"></rui-breadcrumb>
    
    <rui-breadcrumb-dropdown text="Breadcrumb Dropdown">
        <rui-button-menu-option text="Buttons" route="/#/Buttons"></rui-button-menu-option>
        <rui-button-menu-separator></rui-button-menu-separator>
        <rui-button-menu-option text="Google" (rui-menu-option-click)="goGoogle()"></rui-button-menu-option>
        <rui-button-menu-option text="Jack Henry" (rui-menu-option-click)="goJha()"></rui-button-menu-option>
        <rui-button-menu-separator></rui-button-menu-separator>
        <rui-button-menu-option text="Disabled" isDisabled="true"></rui-button-menu-option>
    </rui-breadcrumb-dropdown>

</rui-breadcrumbs>

Angular wrapper development

Wrapper reference

jha-function-breadcrumbs
jha-function-breadcrumbs
Module: JhaLayoutModule - Package: @jkhy/responsive-ui-angular

Container for jha-breadcrumb elements at the function view level

No properties or events
jha-breadcrumbs
jha-breadcrumbs
Module: JhaLayoutModule - Package: @jkhy/responsive-ui-angular

Container for jha-breadcrumb elements at the display block or group box level

No properties or events
jha-breadcrumb
jha-breadcrumb
Module: JhaLayoutModule - Package: @jkhy/responsive-ui-angular

Breadcrumb element to show each level of hierarchy. Use this for each breadcrumb at either the function view level or at the display block level.

NameTypeDefaultDescription
jhaTextstring''Text displayed in the breadcrumb
jhaTooltipstring''Tooltip to display when the mouse hovers over the breadcrumb
jhaRouterLinkstring''If the breadcrumb links to a view within the app, assign to the route for that view to this attribute. If the breadcrumb executes code, define a click event handler for it. Otherwise if the breadcrumb links to a URL outside of the app, assign the outside URL to the jhaExternalUrl attribute.
jhaRouterLinkActiveOptionsobject{}

If the active router link options need to be set, use this attribute. Pass in an object just like you would for the routerLinkActiveOptions directive.

For example:
[jhaRouterLinkActiveOptions]="{exact: true}"

jhaQueryParamsobject{}

If the breadcrumb links need to include query parameters, populate the jhaQueryParams with an object that includes your parameters.

For example: [jhaQueryParams]="{order: 'popular', 'feature': true}"

jhaExternalUrlstring''If the breadcrumb links to a view within the app, set its jhaRouterLink to the route for that view. If the breadcrumb executes code, define a click event handler for it. Otherwise if the breadcrumb links to a URL outside of the app, assign that URL to this attribute.
jhaExternalUrlInNewWindowbooleantrueIf the breadcrumb links to a URL outside of the app, set this to true if that link should be opened in a new tab/window, otherwise bind this to false.
isClickablebooleantrueSpecifies whether the breadcrumb is clickable or not. You should leave this at its default value of true other than very rare cases where a breadcrumb provides contextual info but isn’t clickable.
jha-breadcrumb-dropdown
jha-breadcrumb-dropdown
Module: JhaLayoutModule - Package: @jkhy/responsive-ui-angular

Breadcrumb that displays a dropdown menu when pressed.

NameTypeDefaultDescription
jhaTextstring''Text displayed in the breadcrumb
jhaTooltipstring''Tooltip to display when the mouse hovers over the breadcrumb
jha-breadcrumb-menu-option
jha-breadcrumb-menu-option
Module: JhaLayoutModule - Package: @jkhy/responsive-ui-angular

Option in dropdown menu.

NameTypeDefaultDescription
jhaTextstring''Text displayed in the dropdown option
jhaTooltipstring''Tooltip displayed when the mouse hovers over the dropdown option
jhaIsDisabledbooleanfalseSpecifies whether the dropdown option is disabled.
jhaClickeventIf the dropdown option executes code, define a jha-click event handler for it.
jhaRouterLinkstring''If the dropdown option links to a view within the app, this specifies the route for that view.
jhaExternalUrlstring''If the dropdown option links to a URL outside of the app, this specifies the URL.
jhaExternalUrlInNewWindowbooleantrueIf the dropdown option links to a URL outside of the app, leave this at its default value of true if that link should open in a new tab/window, otherwise bind this to false.
jha-breadcrumb-menu-separator
jha-breadcrumb-menu-separator
Module: JhaLayoutModule - Package: @jkhy/responsive-ui-angular

Separator between groups of options in a dropdown menu

No properties or events

Implementation

Begin by importing the JhaLayoutModule module into your application.

Import the module
// import into app.module
import { JhaLayoutModule } from '@jkhy/responsive-ui-angular/jha-layout';

@NgModule({
    imports: [
        ...
        JhaLayoutModule,
        ...
    ]
})

export class AppModule(){}

For breadcrumbs at the function view level, nest instances of jha-breadcrumb within the jha-function-breadcrumbs tag.

Do not include the lowest level of the hierarchy for breadcrumbs at the function view level, since the function view title acts as the final breadcrumb in the hierarchy.

Breadcrumb example
<jha-function-view jhaTitle="Customer Search">

    <!-- Breadcrumbs at the function view level -->
    <jha-function-breadcrumbs>
        <jha-breadcrumb jhaText="Home" jhaRouterLink="/Home"></jha-breadcrumb>
    </jha-function-breadcrumbs>

</jha-function-view>

Most breadcrumbs perform a simple navigation when clicked. But breadcrumbs that link from one “spoke” to another in drill-down navigation scenarios display a dropdown menu of all available sibling spoke navigation options when clicked.

Breadcrumb dropdown example
<jha-function-breadcrumbs>

    <jha-breadcrumb jhaText="Home" jhaRouterLink="/Home"></jha-breadcrumb>
    
    <jha-breadcrumb-dropdown jhaText="Breadcrumb Dropdown">
        <jha-breadcrumb-menu-option jhaText="Router Link" jhaRouterLink="/Home"></jha-breadcrumb-menu-option>
        <jha-breadcrumb-menu-option jhaText="External URL" jhaExternalUrl="https://www.google.com">
        </jha-breadcrumb-menu-option>
        <jha-breadcrumb-menu-separator></jha-breadcrumb-menu-separator>
        <jha-breadcrumb-menu-option jhaText="Router Link" jhaRouterLink="/Home"></jha-breadcrumb-menu-option>
    </jha-breadcrumb-dropdown>

</jha-function-breadcrumbs>

For the less common case of breadcrumbs at the display block level, nest instances of jha-breadcrumb within the jha-breadcrumbs tag. Position the breadcrumbs at the top of the display block, just below the title and toolbar if present.

Unlike breadcrumbs at the function view, you should include all levels of the hierarchy in the breadcrumbs, including the last level. The display block title is unrelated to breadcrumbs at the display block level.

Display block breadcrumb example
<jha-function-view jhaTitle="Customer Search">

    <jha-display-block jhaTitle="Display Block Example">

        <!-- Breadcrumbs at the display block level -->
        <jha-breadcrumbs>
            <jha-breadcrumb *ngFor="let level of levels" jhaText="{{level.name}}" (click)="returnToLevel(level)">
            </jha-breadcrumb>
        </jha-breadcrumbs>

    </jha-display-block>

</jha-function-view>

Component playground


Design

Figma design

Figma design info
You can find this component in the Components - Content Layout page in the Figma UI Kit.
Dev ComponentDesign Component Name
Function view with space for breadcrumbsAdd RUI / Layout / Function View and switch on “Has Breadcrumbs”
BreadcrumbRUI / Layout / Breadcrumb
Breadcrumb dropdownRUI / Layout / Breadcrumb Dropdown

For breadcrumbs at the function level:

  • Start by adding a function view with space for breadcrumbs.
  • Drag in instances of the Breadcrumb or Breadcrumb Dropdown components as needed. Change the text for each to an appropriate value.
  • For breadcrumbs at the function level, the function title itself acts as the active breadcrumb. Do not add a separate active breadcrumb at this level.
  • For breadcrumbs at the function level, position the breadcrumb list 5 pixels above the function title.

For breadcrumbs at the content level:

  • Add one or more inactive breadcrumbs using the Breadcrumb component.
  • Add exactly one active breadcrumb to the right of all the inactive breadcrumbs.
  • Vertically center the list of breadcrumbs.

Adobe XD design

Adobe XD design info
You can find this component in these artboards in the Adobe XD design samples:
  • Sample App - Breadcrumbs
Dev ComponentDesign Component Name
Function view with space for breadcrumbsJHA / Layout / Function View for Breadcrumbs
Inactive breadcrumb at either the function level or the content levelJHA / Layout / Breadcrumb
Active breadcrumb at the content levelAdd text and apply the “JHA / Text / Breadcrumb Active” character style.
Breadcrumb dropdownJHA / Layout / Breadcrumb Dropdown

For breadcrumbs at the function level:

  • Start by adding a function view with space for breadcrumbs.
  • Drag in instances of the Breadcrumb or Breadcrumb Dropdown components as needed. Change the text for each to an appropriate value.
  • For breadcrumbs at the function level, the function title itself acts as the active breadcrumb. Do not add a separate active breadcrumb at this level.
  • For breadcrumbs at the function level, position the breadcrumb list 5 pixels above the function title.

For breadcrumbs at the content level:

  • Add one or more inactive breadcrumbs using the Breadcrumb component.
  • Add exactly one active breadcrumb to the right of all the inactive breadcrumbs.
  • Vertically center the list of breadcrumbs.

Support options
Have questions on this topic?
Join the Responsive UI team in Microsoft Teams to connect with the community.
See something in this page that needs to change?
Send us feedback on this page.
Last updated Wed Sep 25 2024