Giter Club home page Giter Club logo

react-breadcrumbs's Introduction

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" />

react-breadcrumbs's People

Contributors

robbestad avatar skipjack avatar loris avatar avarun42 avatar thomas-p-wilson avatar ribeiroct avatar jackgeek avatar lbatson avatar mtsyganov avatar dignifiedquire avatar konekoya avatar leesiongchan avatar keul avatar maxmati avatar knowbody avatar pavelvanecek avatar srolel avatar theclark avatar vkammerer avatar bakatrouble avatar mtsr avatar jscinoz avatar gpkc avatar foxxmd avatar ebpa avatar derekyau avatar dellement avatar balehok avatar alasdairhurst avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.