1.0.0 • Published 5 years ago

react-easy-breadcrumb v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

react-easy-breadcrumb

A simple react component for generating breadcrumbs.

Installation

npm install react-easy-breadcrumb

or

yarn add react-easy-breadcrumb

Breadcrumbs component props

The breadcrumbs instance is implemented in the Breadcrumbs component.

propertytypedefaultdescription
separatorelement>separator between breadcrumbs items
crumbsarrayundefinedarray of breadcrumbs items

crumbs props

The crumbs property is array of breadcrumbs item that will be used in the Breadcrumbs component.

propertytypedefaultdescription
linkLink (eg: https:/github.com/)/Link that is to be routed when clicked on the item.
titleTextempty stringThe title that will be displayed as a crumb/item.
tintColorColor or hex value#4a4a4aColor that you want the item to display.

Example

import { Breadcrumbs } from 'react-easy-breadcrumb';
import Separator from '../images/separator.svg';

const links = [
	{
		link: 'http://github.com/',
		title: 'Home'
	},
	{
		link: 'http://google.com/',
		title: 'Profile',
		tintColor: '#3098'
	},
	{
		link: 'http://twitter.com/',
		title: 'Bookmarks',
		tintColor: 'red'
	}
];

const Page = (
	<div>
		<Breadcrumbs crumbs={links} separator={Separator} />
	</div>
);

export default Page;

result

LICENSE

MIT