Overview
TheBreadCrumb component displays a horizontal series of circular indicators (dots) to show progress through a multi-step flow. The current active step is highlighted with the primary color while inactive steps are displayed in a low-contrast color.
Basic Usage
Examples
Simple Progress Indicator
Multi-Step Form
With Custom Styling
Props
Total number of steps to display. Each step is represented by a circular dot indicator.
Current active step index (0-based). This step will be highlighted with the primary background color.
Custom CSS styles to apply to the container element.
Custom CSS class name for the container.
Styling
The component uses the following design tokens:- Active step:
Color.background.primary - Inactive step:
Color.text.low - Dot size: 8px × 8px
- Dot spacing: 16px between dots
- Border radius: 5px (circular)
Accessibility
The component includes arole="bread-crumb" attribute on the container element for proper semantic HTML structure.
TypeScript
Best Practices
- Use
selectedStepas a 0-based index (first step is 0, not 1) - Keep the number of steps reasonable (3-7 steps recommended) for better UX
- Update
selectedStepwhen the user progresses through your flow - Consider combining with validation logic to prevent skipping steps