Skip to content

Breadcrumb ​

Introduction ​

The Breadcrumb component is used to display the current page's position within the system hierarchy. mengyue-components has encapsulated this component and conducted vitest testing. You can use <MYBreadcrumb></MYBreadcrumb> or <MYBreadcrumb /> to implement a breadcrumb component.

Basic Usage ​

Basic Breadcrumb ​

Use the separator prop to customize the separator.

Code Demo
展开代码

Custom Separator ​

You can use any character as the separator.

Code Demo
展开代码

API Reference ​

ParameterDescriptionTypeOptionsDefault
separatorSeparatorstring—'/'
separatorIconCustom separator iconobject | function—null
ParameterDescriptionTypeOptionsDefault
toRoute navigation objectobject—null
replaceWhether to use replace for route navigationboolean—false

Type Definitions ​

typescript
interface BreadcrumbProps {
  separator?: string;
  separatorIcon?: Object | Function;
}

interface BreadcrumbItemProps {
  to?: Object;
  replace?: boolean;
}

Released under the MIT License.