useBreadcrumbs

Provides the behavior and accessibility implementation for a breadcrumbs component. Breadcrumbs display a hierarchy of links to the current page or resource in an application.

Example
Breadcrumbs.tsx
Breadcrumbs.css
Link.css
import {Breadcrumbs, Breadcrumb} from './Breadcrumbs';

<Breadcrumbs>
  <Breadcrumb onPress={() => alert('Pressed Folder 1')}>Folder 1</Breadcrumb>
  <Breadcrumb onPress={() => alert('Pressed Folder 2')}>Folder 2</Breadcrumb>
  <Breadcrumb>Folder 3</Breadcrumb>
</Breadcrumbs>

API

Shows a breadcrumbs component with labels pointing to its parts, including the navigation container, breadcrumb items, separators, and current page elements.TrendSub ItemJanuary 2019 AssetsBreadcrumb itemSeparatorCurrent pageNavigation
<Breadcrumbs>
  <Breadcrumb>
    <Link />
  </Breadcrumb>
</Breadcrumbs>
useBreadcrumbs(props: ): useBreadcrumbItem(props: , ref: <FocusableElementnull>):

AriaBreadcrumbsProps

NameType
NameType
navPropsDOMAttributes

Props for the breadcrumbs navigation element.

AriaBreadcrumbItemProps

NameTypeDefault
elementTypestringDefault: 'a'

The HTML element used to render the breadcrumb link, e.g. 'a', or 'span'.

isCurrentbooleanDefault:

Whether the breadcrumb item represents the current page.

isDisabledbooleanDefault:

Whether the breadcrumb item is disabled.

childrenReactNodeDefault:

The contents of the breadcrumb item.

NameType
itemPropsDOMAttributes

Props for the breadcrumb item link element.