Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-breadcrumbs

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-breadcrumbs

Automatic breadcrumbs for react-router

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.2K
decreased by-20.22%
Maintainers
1
Weekly downloads
 
Created
Source

React Breadcrumbs

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

Installation

npm install --save react-breadcrumbs

Demo

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

>> TO THE LIVE DEMO

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.
  • 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 makes allows 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" />

Keywords

FAQs

Package last updated on 14 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc