papillon-breadcrumb
v1.0.52
Published
Papillon Breadcrumb React components for Primer Breadcrumb
Downloads
11
Maintainers
Readme
Papillon Breadcrumb
Breadcrumb navigation for GitHub's pages with parents / grandparents.
This repository is a module of the full papillon repository.
Install
This repository is distributed with npm. After installing npm, you can install papillon-breadcrumb
with this command.
$ npm install --save papillon-breadcrumb
Explorer
Check out how to use Papillon Breadcrumb with React 16, Webpack 4 and Babel 7 here
NPM
Get the latest papillon-breadcrumb here
Usage
You can import it like this.
import Breadcrumb from 'papillon-breadcrumb'
Documentation
Breadcrumbs are used to show taxonomical context on pages that are many levels deep in a site’s hierarchy. Breadcrumbs show and link to parent, grandparent, and sometimes great-grandparent pages. Breadcrumbs are most appropriate on pages that:
- Are many levels deep on a site
- Do not have a section-level navigation
- May need the ability to quickly go back to the previous (parent) page
Default
const items = [{ href: '/business', text: 'Business' }, { href: '/business/customer', text: 'Customers' }, { href: '', text: 'MailChimp' }]
<Breadcrumb items="{items}" selectedIndex="{2}" />