• Stars
    star
    410
  • Rank 105,468 (Top 3 %)
  • Language
    JavaScript
  • License
    ISC License
  • Created almost 10 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Automatic breadcrumbs for React-Router

React Breadcrumbs

React component use to generate a breadcrumb trail (compatible with React Router).

Installation

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 [email protected]

Demo

The /demo directory provide one example of how this package can be used. See the /demo for the code powering the small site.

Usage

This package exposes two components, a <Breadcrumbs> component to wrap the entire application and a <Breadcrumb> component to use throughout the different sections (e.g. <Route>s) within the application.

Breadcrumbs

The top-level <Breadcrumbs> component accepts the following props:

  • className (string): A class name for the outer wrapper element.
  • hidden (bool): Hide the inner breadcrumbs wrapper.
  • setCrumbs (func): A function(crumbs: [Object]): [Object] which will be called before crumbs are rendered.
  • wrapper (func|class): A react component to use for the inner wrapper.

Breadcrumb

  • data (object): An extended location descriptor. See below...
  • hidden (bool): Hide an individual breadcrumb (rarely needed).

The data object allows any valid location descriptor key (e.g. pathname or search) as well as a title prop:

{
  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:

title: 'Home'
title: <span title="Hovered!">Home</span>
title: <CustomComponent title="Home" icon="house" />

Authors

This project would not have been where it is today without massive contributions from a whole lot of people (AUTHORS). Suport for React Router v4 support was written entirely by (@skipjack).

More Repositories

1

react-iframe

Simple solution for using iframes in React
TypeScript
412
star
2

Rantjs

Procedurally generate text with JavaScript
JavaScript
220
star
3

learn-react

Examples and modules that shows you how to use React
JavaScript
92
star
4

upcoming-conferences

Upcoming web developer conferences
90
star
5

react-stickydiv

React Component which keeps any HTML element sticky whenever it is scrolled beyond view
JavaScript
58
star
6

svenjs

A JavaScript framework for composable web apps
JavaScript
45
star
7

isomorphic-react-boilerplate

JavaScript
13
star
8

iAdHelper

Objective-C Helper class to ease integration with iAD for Cocos2D v3
Objective-C
12
star
9

ezreact

The easiest way to get started with React.js development
JavaScript
11
star
10

react-markdown-to-html

React Component that converts a Markdown file to HTML
JavaScript
9
star
11

React-Reflux-Presentation-Apr-21-2015-Teknologihuset-Oslo

React/Reflux Presentation Apr 21 2015 Teknologihuset Oslo
8
star
12

iOS7-Rest-Example-App

Consumes a REST API in iOS7 and populates a table view with the results
Objective-C
5
star
13

react-editable-div

React Component that enables editable divs
JavaScript
5
star
14

heroku-apigility

Heroku buildpack for hosting Apigility APIs
Puppet
4
star
15

reverse-spaceinvaders

You are the alien. Get them boys.
JavaScript
4
star
16

dom-find

Utils for finding DOM elements. Used by react-stickydiv
JavaScript
4
star
17

react-grid

A visual HTML gridsystem on top of Bootstrap 3
JavaScript
3
star
18

tictactoe

The classic game in pure javascript
JavaScript
3
star
19

Python-fundamentals

Assignments from the Python fundamentals course
Python
3
star
20

reactnative-uvapp

A port of Inmetas UV App to React Native
Objective-C
2
star
21

zombietron2084

Ludum Dare #31. It's 2084 and Zombies are everywhere. Your job is to take them out, and save the innocent people roaming around.
JavaScript
2
star
22

koa-proxy

A fantastic proxier for Koa 2
JavaScript
2
star
23

ezreact-starter

Starter app for EZReact
JavaScript
2
star
24

cra-react-iframe

React-iframe demo using CRA
JavaScript
2
star
25

SecureHash

Secure hash class for PHP
PHP
2
star
26

zf2-smarty-skeleton

PHP
1
star
27

Newhomepage

New blog homepage
PHP
1
star
28

ReactJSBlueprints

A collection of all the code provided in my book ReactJS Blueprints
1
star
29

imagetocanvas

Helper tools to put an image on a canvas
JavaScript
1
star
30

Lille-gangetabellen

En liten gangetabell
Processing
1
star
31

sdrive-docs

SDrive & Shadow Drive docs
1
star
32

universal-jsx

A standalone JSX compiler
JavaScript
1
star
33

Recsys-pa2

My solution to Recommender Systems Programming Assignment 2
1
star
34

zf2blog

Blog application using Zend Framework and Twig. Requires PHP v5.3.3 or above.
PHP
1
star
35

random-guid

Generate a random GUID
JavaScript
1
star
36

recsys_wa2

My solution to WA2 for Coursera course Introduction to Recommender Systems
Java
1
star
37

kafka-consumer

Start app for consuming Kafka topics
Rust
1
star
38

reactjs-presentation-javazone2014

Min presentasjon pƄ JavaZone 2014
1
star
39

spacemonkey_processing_2

SHMUP made in Processing2
JavaScript
1
star
40

svg-sprites

demo
JavaScript
1
star
41

Recsys---Programming-Assignment-1

My solution to the first programming assigment for the Recommender System course
1
star
42

SarPoTwigExtractor

Module that traverses a given folder, extracts all strings within translate('') and stores every new string in the modules language files. Made for Zend Framework 2
PHP
1
star
43

universal-jsx-loader

Webpack loader for universal-jsx
JavaScript
1
star
44

security

JavaScript
1
star