Skip to main content
Version: 3.xx.xx

Breadcrumb

A breadcrumb displays the current location within a hierarchy. It allows going back to states higher up in the hierarchy. <Breadcrumb> component built with Material UI Breadcrumb components using the useBreadcrumb hook.

info

You can refer to the source-code of the <Breadcrumb> component to see how it is built. You can also create your custom breadcrumb component inspired by the source code.

Properties​

<Breadcrumb> component uses the Material UI Breadcrumb component so it can be configured with the breadcrumbProps property.

import { List, Breadcrumb } from "@pankod/refine-mui";

export const PostList: React.FC = () => {
return (
<List breadcrumb={<Breadcrumb breadcrumbProps={{ separator: "-" }} />}>
...
</List>
);
};

showHome​

If your application has a DashboardPage, the home button is shown to the top of the hierarchy by default. If you don't want to show the home button, you can set showHome to false.

import { List, Breadcrumb } from "@pankod/refine-mui";

export const PostList: React.FC = () => {
return <List breadcrumb={<Breadcrumb showHome={false} />}>...</List>;
};

hideIcons​

If you don't want to show the resource icons on the breadcrumb, you can set hideIcons to true.

import { List, Breadcrumb } from "@pankod/refine-mui";

export const PostList: React.FC = () => {
return (
<List breadcrumb={<Breadcrumb hideIcons />}>...</List>;
);
};

API Reference​

Properties​

PropertyDescriptionTypeDefault
breadcrumbPropsPasses properties for <Breadcrumb>BreadcrumbProps
showHomeShows the home button if application has DashboardPagebooleantrue
hideIconsAllows to hide resource iconsbooleanfalse