Breadcrumbs

Shows where the user is within the app hierarchy.

Breadcrumbs

To implement Button component into your project you’ll need to add the import:

import Breadcrumbs, { BreadcrumbsItem } from "@kiwicom/orbit-components/lib/Breadcrumbs";

After adding import into your project you can use it simply like:

<Breadcrumbs>
<BreadcrumbsItem href="https://kiwi.com">Kiwi.com</BreadcrumbsItem>
</Breadcrumbs>

Props

Table below contains all types of the props available in Breadcrumbs component.

NameTypeDefaultDescription
dataTeststringOptional prop for testing purposes.
idstringSet id for Breadcrumbs
childrenReact.NodeThe content of the Breadcrumbs, normally BreadcrumbsItem.
onGoBackevent => void \| PromiseCallback for handling back button action. If present the back button is visible.
backHrefstringThe location for the back button to direct to. Turns the back button into a link when present (renders as an a element).
goBackTitleTranslation"Back"Property for passing translation string when you want to use the onGoBack callback.
spaceAfterenumAdditional margin-bottom after component. See spacing docs

Functional specs

  • The last BreadcrumbsItem will have stronger font-weight automatically. Also, all meta information are automatically render too, so you don’t have to specify it explicitly.

Subcomponents

Breadcrumbs requires one subcomponent - BreadcrumbsItem.

BreadcrumbsItem

import BreadcrumbsItem from "@kiwicom/orbit-components/lib/Breadcrumbs/BreadcrumbsItem";

Usage:

<BreadcrumbsItem href="https://kiwi.com">Kiwi.com</BreadcrumbsItem>

Props

Table below contains all types of the props available in BreadcrumbsItem component.

NameTypeDefaultDescription
childrenstringThe content of the BreadcrumbsItem.
dataTeststringOptional prop for testing purposes.
hrefstringThe URL to link when the BreadcrumbsItem is clicked..
idstringHTML id attribute for BreadcrumbsItem.
onClickevent => void \| PromiseFunction for handling the onClick event.