Socket
Book a DemoInstallSign in
Socket

auto-breadcrumb

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auto-breadcrumb

Auto generate breadcrumb for React-Router 4.xx

1.3.0
latest
Source
npmnpm
Version published
Weekly downloads
56
19.15%
Maintainers
1
Weekly downloads
 
Created
Source

AutoBreadcrumb

Auto generate breadcrumb for React Router 4.xx

Build Status npm package

Install

Use yarn

$ yarn add auto-breadcrumb

Use npm

$ npm install auto-breadcrumb --save

Example

Usage

import breadcrumbConfig from 'auto-breadcrumb';

const Breadcrumbs = breadcrumbConfig(config);

render(<Breadcrumbs pathname={location.pathname} />, MOUNT_DOM);

Api

  • The config
keyNametypedefaultdescription
staticRoutesMapObject{'/':'Home'}No params routes map to breadcrumb name
dynamicRoutesMapObject{}With params routes map to breadcrumb name
homePathString/The index path
BreadcrumbReactComponentulThe Breadcrumb container
BreadcrumbItemReactComponentliThe Breadcrumb Item
containerPropsObject{}The container props
itemPropsObject{}The item props
LinkComponentReactComponentLinkThe Custom LinkComponent use itemRender
notFoundstring404 NotFoundThe custom notFound name
itemRender(name, path?) => ReactNode-You can custom everything for item display, if the param path is not given, you should render a text node(not clickable)
isDisplayInHomebooleanfalseIs the Breadcrumb displayed on the home page
  • The Breadcrumbs Component props
propsNametypeisRequiredefaultdescription
pathnameStringY-The full location path

License

MIT

Keywords

react

FAQs

Package last updated on 02 Sep 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.