A list of navigation items to the parent views of the current view in hierarchical order.
import React from 'react';
import { Breadcrumbs, Breadcrumb } from '@minddrop/ui';
export const BreadcrumbsDemo = () => (
<div style={{ display: 'flex', alignItems: 'center' }}>
<Breadcrumbs
style={{
padding: '8px 40px 8px 16px',
backgroundColor: 'var(--bgApp)',
borderRadius: 'var(--radiusLg)',
}}
>
<Breadcrumb label="Tea" />
<Breadcrumb label="Books" />
<Breadcrumb label="The Book Of Tea" />
</Breadcrumbs>
</div>
);
export default BreadcrumbsDemo;
Import the component from the @minddrop/ui
package.
import { Breadcrumbs, Breadcrumb } from '@minddrop/ui';
export default () => {
return (
<Breadcrumbs>
<Breadcrumb label="Tea" />
<Breadcrumb label="Books" />
<Breadcrumb label="The Book Of Tea" />
</Breadcrumbs>
);
};
Contains the Breadcrumb
elements.
BreadcrumbsProps
extends React.HTMLAttributes<HTMLDivElement>
.
Prop | Type | Default |
---|---|---|
children | React.ReactElement<BreadcrumbProps>[] |
An item in the breadcrumbs list.
BreadcrumbProps
extends React.HTMLAttributes<HTMLLIElement>
.
Prop | Type | Default |
---|---|---|
label* | node | |
onClick | node |
Adheres to the Breadcrumb WAI-ARIA design pattern.
Key | Description |
---|---|
Space | Activates the breadcrumb button. |
Enter | Activates the breadcrumb button. |