rbb
react-bootstrap-breadcrumbs
npm i react-bootstrap-breadcrumbs
rbb

react-bootstrap-breadcrumbs

Breadcrumbs for React-Router and Bootstrap

by Alexander Kuznetsov

0.1.2 (see all)License:MITTypeScript:Not Found
npm i react-bootstrap-breadcrumbs
Readme

react-bootstrap-breadcrumbs

Breadcrumbs for React-Router and Bootstrap

Inspired by React Breadcrumbs

Installation

npm i -S react-bootstrap-breadcrumbs

Example

<Route name='items' path='/items' handler={ItemsPage}>
  <Route name='item' path=':itemId' handler={ItemPage} />
</Route>

...

function getRouteTitle(name, route, params) {
  switch(name) {
  case 'items':
    return 'Items';
  case 'item':
    return 'Item #' + params.itemId;
  }
}

render() {
  return (
    <div>
      <Breadcrumbs getTitle={getRouteTitle} />
    </div>
  );
}

Render result:

<ol class="breadcrumbs">
  <li><a href="/items">Items</a></li>
  <li class="active">Item #42</li>
</ol>

Downloads/wk

19

GitHub Stars

15

LAST COMMIT

6yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

1

OPEN PRs

1
VersionTagPublished
0.1.2
latest
6yrs ago
0.0.2-beta4
beta
7yrs ago
No alternatives found
No tutorials found
Add a tutorial