Backpack UI
Components
Breadcrumb

Breadcrumb

Breadcrumb components are used to display the navigation hierarchy of a website, allowing users to navigate back to previous pages. The Breadcrumb component is the container for the BreadcrumbItem components, which represent individual navigation items in the hierarchy.


Importing

Import the components as follows:


_10
import { Breadcrumb, BreadcrumbItem } from '@ef-global/backpack/Breadcrumb';

Usage

To create a breadcrumb navigation, use the Breadcrumb component as a container and add multiple BreadcrumbItem components as children.


_10
<Breadcrumb>
_10
<BreadcrumbItem link="/">Home</BreadcrumbItem>
_10
<BreadcrumbItem link="/section">Section</BreadcrumbItem>
_10
<BreadcrumbItem link="/section/page">Page</BreadcrumbItem>
_10
</Breadcrumb>

Props

BreadcrumbProps

NameTypeDefaultDescription
childrenReactNode | ReactNode[]The breadcrumb items to be rendered.
classNamestringAdditional CSS classes to apply to the Breadcrumb component.
inversebooleanfalseSet to true to use an inverse color scheme for the breadcrumb.

BreadcrumbItemProps

NameTypeDefaultDescription
childrenReactNodeThe content of the breadcrumb item.
asChildbooleanfalseSet to true to render the item as a child component.
classNamestringAdditional CSS classes to apply to the BreadcrumbItem component.
linkstringThe URL to navigate to when the breadcrumb item is clicked.
inversebooleanfalseSet to true to use an inverse color scheme for the breadcrumb item.

Examples

Basic Breadcrumb Example



_10
<Breadcrumb>
_10
<BreadcrumbItem link="/">Home</BreadcrumbItem>
_10
<BreadcrumbItem link="/section">Section</BreadcrumbItem>
_10
<BreadcrumbItem link="/section/page">Page</BreadcrumbItem>
_10
</Breadcrumb>

Breadcrumb with Inverse Color Scheme



_10
<Breadcrumb inverse>
_10
<BreadcrumbItem link="/" inverse>Home</BreadcrumbItem>
_10
<BreadcrumbItem link="/section" inverse>Section</BreadcrumbItem>
_10
<BreadcrumbItem link="/section/page" inverse>Page</BreadcrumbItem>
_10
</Breadcrumb>