Skip to main content
Version: 1.0.3

Breadcrumbs

Breadcrumbs provide users with a way to navigate back to previous pages or sections in a hierarchical structure. They help users understand their current location within the website and provide quick access to parent pages.

Installation

ignix add component breadcrumbs

Usage

Import the component:

import { Breadcrumbs } from '@ignix-ui/breadcrumbs';

Basic Usage

function BasicBreadcrumb() {
return (
<Breadcrumbs
items={[
{ label: 'Home', href: '/' },
{ label: 'Products', href: '/products' },
{ label: 'Current Page' }
]}
/>
);
}

Props

PropTypeDefaultDescription
items{ label: string; href?: string; icon?: React.ElementType }[][]Array of breadcrumb items to display
variant'text' | 'step' | 'progress' | 'custom''text'Visual style variant of the breadcrumbs
size'sm' | 'md' | 'lg''md'Size of the breadcrumb items
shape'rectangle' | 'round' | 'pill' | 'default''pill'Border radius shape of the breadcrumb items
separatorIconReact.ElementTypeChevronRightCustom icon to use as a separator between breadcrumb items
stepsstring[][]Array of step labels (used with 'step' and 'progress' variants)
currentStepnumber0Current active step index (0-indexed)
bgColor'primary' | 'secondary' | 'success' | 'destructive' | 'transparent'-Background color variant for the breadcrumbs
textColor'primary' | 'secondary' | 'muted' | 'accent'-Text color variant for the breadcrumbs
classNamestring-Additional CSS classes to apply to the root element
asChildbooleanfalseIf true, the component will merge its props onto its immediate child