Skip to main content

Breadcrumb

Breadcrumb

The Breadcrumb component renders a hierarchical navigation path. It accepts a tree of nodes and tracks which prefix of that tree is currently selected, displaying it as a horizontal crumb trail. A trailing dropdown allows the user to navigate forward from the current position by selecting from the current node's children. Clicking any crumb in the trail navigates back to that level.

Properties

NameDescriptionProperty Type
itemsThe full breadcrumb hierarchy, defined as a flat array of top-level nodes. Each node may declare children representing the next level down. The component tracks which prefix of this tree is the active path and builds the trailing dropdown from the current node's children (or from the top-level items when nothing is selected yet). See BreadcrumbNode Properties below.array
selectedPathThe currently selected path as a /-delimited string of node IDs from root to the current node (e.g. home/reports/q1). Readable at runtime and writable to programmatically set the active path.string
selectedDataThe data payload of the currently selected node. Mirrors the value sent back by onPathChange.any
separatorConfiguration for the icon rendered between crumbs. Defaults to a chevron. See Separator Properties below.object
styleStyle applied to the breadcrumb's root <nav> container.style
listStyleStyle applied to the <ol> list wrapper containing all breadcrumb items.style
itemStyleStyle applied to each <li> item, wrapping both the crumb button and its forward-navigation dropdown trigger.style
ellipsisStyleStyle applied to the ellipsis indicator shown in place of a crumb's label when that node is collapsed.style
dropdownTriggerStyleStyle applied to the button that opens the forward-navigation dropdown.style
dropdownContentStyleStyle applied to the dropdown panel listing forward-navigation options.style
dropdownItemStyleStyle applied to each entry within the forward-navigation dropdown.style

Each node in the items array (and within any node's children) supports the following properties.

NameDescriptionProperty Type
idA stable identifier for the node, used as its key and included in selectedPath. Falls back to the node's position in the list if omitted.string
labelThe display text for the crumb and dropdown entry.string
disabledWhen true, prevents the node from being clicked without hiding it.boolean
dataA freeform payload (object, array, string, number, or boolean) that is round-tripped back to scripts via onPathChange and written to selectedData when the node is selected. Useful for passing a record ID or entity type.any
collapsedBreaks the path into ellipsis, best used with long paths to reserve spaceboolean
childrenAn array of child BreadcrumbNode objects reachable from this node. Offered in the trailing dropdown once this node is the last selected crumb.array
stylePer-node style override for this crumb's button, layered on top of the shared itemStyle.style

Example items array:

[
{
"id": "home",
"label": "Home",
"data": {},
"children": [
{
"id": "reports",
"label": "Reports",
"data": { "section": "reports" },
"children": [
{
"id": "q1",
"label": "Q1 2026",
"data": { "period": "2026-Q1" },
"children": []
}
]
},
{
"id": "archive",
"label": "Archive",
"disabled": true,
"data": {},
"children": []
}
]
}
]

Separator Properties

NameDescriptionProperty Type
typeWhether to use the default chevron separator or a custom icon. Options: default, custom.string
iconThe icon to use when type is custom. Accepts an icon path in the Perspective icon format.string
sizeThe pixel size of the custom icon when type is custom. Default is 14.number
styleStyle applied to the separator's icon wrapper element.style

Component Events

onPathChange

Triggered when the user clicks a crumb in the trail (navigating back) or selects an item from the forward-navigation dropdown (navigating forward).

PropertyTypeDescription
event.patharrayThe full selected path after this change, as an array of node objects from root to the newly selected node.
event.selectedPathstringThe same path flattened to a /-delimited string of node IDs (e.g. home/reports/q1). Mirrors the value written back to the selectedPath property.
event.selectedDataanyThe data payload of the clicked node, or null if the node has none. Mirrors the value written back to selectedData.
event.nodeobjectThe specific node that was clicked or picked from the dropdown to produce this path change.