Breadcrumbs
Breadcrumbs create hierarchical representation and navigation.
Examples
import React from 'react';
import ReactDOM from 'react-dom';
import { Breadcrumbs, Breadcrumb, Hyperlink } from 'furl-components';
ReactDOM.render(
<div>
<Breadcrumbs separator='>'>
<Breadcrumb>
<Hyperlink href='/my-files'>My files</Hyperlink>
</Breadcrumb>
<Breadcrumb>My documents</Breadcrumb>
</Breadcrumbs>
<Breadcrumbs data={[
{ href: '#', title: 'My files' },
'My documents'
]} />
</div>,
document.getElementById('root')
);API
| Property | Description | Type | Default | ||
|---|---|---|---|---|---|
| separator | breadcrumbs separator style | string | '/' | ||
| data | breadcrumbs data source | array(string/object) | |||
Notes
- You can populate breadcrumbs either via passing children to it or via the use of the
dataprop. Ifdatais provided, it will take precedence over passed children, therefore rendering only the content provided indata. Breadcrumbsonly accepts children of theBreadcrumbcomponent type.dataonly accepts an array of values, each of which can either be a string or an object. Objects in thedataarray must contain atitle, optionally ahrefvalue and any other props that you want to pass.
