@trendmicro/react-breadcrumbs
v0.5.5
Published
Trend Micro Components: React Breadcrumbs
Downloads
1,148
Readme
react-breadcrumbs
React Breadcrumbs
Demo: https://trendmicro-frontend.github.io/react-breadcrumbs
Installation
- Install the latest version of react and react-breadcrumbs:
npm install --save react @trendmicro/react-breadcrumbs
- At this point you can import
@trendmicro/react-buttons
and its styles in your application as follows:
import Breadcrumbs from '@trendmicro/react-breadcrumbs';
// Be sure to include styles at some point, probably during your bootstraping
import '@trendmicro/react-breadcrumbs/dist/react-breadcrumbs.css';
Usage
import React, { Component } from 'react';
import Anchor from '@trendmicro/react-anchor';
import Breadcrumbs from '@trendmicro/react-breadcrumbs';
class App extends Component {
render() {
return (
<Breadcrumbs>
<Breadcrumbs.Item>
<Anchor href="#/devices">Devices</Anchor>
</Breadcrumbs.Item>
<Breadcrumbs.Item>
<Anchor href="#/devices/firewall">Firewall</Anchor>
</Breadcrumbs.Item>
<Breadcrumbs.Item active>
Policies
</Breadcrumbs.Item>
</Breadcrumbs>
);
}
}
You can add an icon on the right side, or add a line separator under the breadcrumbs.
<Breadcrumbs showLineSeparator>
<Breadcrumbs.Item>
Devices
</Breadcrumbs.Item>
<Breadcrumbs.Item active>
Firewall
</Breadcrumbs.Item>
<Anchor className="pull-right" href="https://github.com/trendmicro-frontend/react-breadcrumbs">
<i className="fa fa-question-circle" style={{ fontSize: 20 }} />
</Anchor>
</Breadcrumbs>
API
Properties
Breadcrumbs
Breadcrumbs.Item
License
MIT