Breadcrumbs
import React from 'react';
import { Breadcrumb, BreadcrumbItem } from 'reactstrap';
const Example = (props) => {
return (
<div>
<Breadcrumb>
<BreadcrumbItem active>Home</BreadcrumbItem>
</Breadcrumb>
<Breadcrumb>
<BreadcrumbItem><a href="#">Home</a></BreadcrumbItem>
<BreadcrumbItem active>Library</BreadcrumbItem>
</Breadcrumb>
<Breadcrumb>
<BreadcrumbItem><a href="#">Home</a></BreadcrumbItem>
<BreadcrumbItem><a href="#">Library</a></BreadcrumbItem>
<BreadcrumbItem active>Data</BreadcrumbItem>
</Breadcrumb>
</div>
);
};
export default Example;
Properties
Breadcrumb.propTypes = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
listTag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
listClassName: PropTypes.string,
cssModule: PropTypes.object,
children: PropTypes.node,
'aria-label': PropTypes.string
};
BreadcrumbItem.propTypes = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
active: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object,
};
No list
Breadcrumbs can work without the usage of list markup.
import React from 'react';
import { Breadcrumb, BreadcrumbItem } from 'reactstrap';
const Example = (props) => {
return (
<div>
<Breadcrumb tag="nav" listTag="div">
<BreadcrumbItem tag="a" href="#">Home</BreadcrumbItem>
<BreadcrumbItem tag="a" href="#">Library</BreadcrumbItem>
<BreadcrumbItem tag="a" href="#">Data</BreadcrumbItem>
<BreadcrumbItem active tag="span">Bootstrap</BreadcrumbItem>
</Breadcrumb>
</div>
);
};
export default Example;
当前内容版权归 reactstrap 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 reactstrap .