Skip to main content

Breadcrumb

A horizontal breadcrumb trail for communicating navigational hierarchy.

When to use it

Use Breadcrumb to show a user's location within a nested navigation hierarchy, such as a folder path or a multi-level settings screen. The last item in items is treated as the current (non-tappable) page. All preceding items are tappable and call onItemTapped with their index.

Import

import 'package:catalyst_ui/catalyst_ui.dart';

Usage

Breadcrumb(
items: const ['Home', 'Settings', 'Profile'],
onItemTapped: (i) => _navigateTo(i),
)

Parameters

ParameterTypeDefaultDescription
itemsList<String>requiredOrdered labels from root to current page.
onItemTappedvoid Function(int index)requiredCalled with the index of a tapped ancestor item.
separatorIconIconData?nullIcon to display between the items. Falls back to context.iconography.forwardIcon when null.

Iconography

Breadcrumb shows separatorIcon between items, falling back to context.iconography.forwardIcon when not provided.