Fork of Automatic breadcrumbs for react-router
npm install x-react-breadcrumbssh
npm install --save react-breadcrumbs
`
Note: this version is only compatible with React-Router v4 and up. If you
need a version that is compatible with React-Router v3 and below, use
`
npm install --save react-breadcrumbs@1.6.x
`
Demo
The /demo directory provide one example of how this
package can be used. See the [/demo][3] for the code powering the small
site.
Usage
This package exposes two components, a component to wrap
the entire application and a component to use throughout
the different sections (e.g. s) within the application.
$3
The top-level component accepts the following props:
- className (string): A class name for the outer wrapper element.
- hidden (bool): Hide the inner breadcrumbs wrapper.
- wrapper (func|class): A react component to use for the inner wrapper.
$3
- data (object): An extended [location descriptor][5]. See below...
- hidden (bool): Hide an individual breadcrumb (rarely needed).
The data object allows any valid [location descriptor][5] key (e.g.
pathname or search) as well as a title prop:
` js
{
title: 'Home', // Any valid PropTypes.node
pathname: '/',
// ... any other location descriptor values
}
`
The fact that the title can be any valid PropTypes.node allows for a huge
amount of customization. The following values are all valid:
` jsx
title: 'Home'
title: Home
title:
`
$3
This project would not have been where it is today without massive contributions from
a whole lot of people ([AUTHORS][6]). Suport for React Router v4 support was written
entirely by ([@skipjack`][7]).