Svelte Breadcrumb - Bitblue

Show the current page location within a navigational hierarchy

Breadcrumbs help users understand where they are and jump back to parent pages. Items are driven by an options array; the active title is matched with activeBreadCrumb.

Setup

<script lang="ts">
	import { Breadcrumb } from '.';
</script>

Default

<script lang="ts">
	import { Breadcrumb } from '.';
	const options = [
		{ title: 'Home', path: '/' },
		{ title: 'Docs', path: '/docs' },
		{ title: 'Breadcrumb', path: '/docs/components/breadcrumb' }
	];
</script>

<Breadcrumb {options} activeBreadCrumb="Breadcrumb" />

Active color

activeClass colors the current crumb. Tokens: pink, blue, red, indigo, purple, black, amber, orange.

<script lang="ts">
	import { Breadcrumb } from '.';
	const options = [
		{ title: 'Home', path: '/' },
		{ title: 'Docs', path: '/docs' },
		{ title: 'Breadcrumb', path: '/docs/components/breadcrumb' }
	];
</script>

<Breadcrumb {options} activeBreadCrumb="Breadcrumb" activeClass="indigo" />

Deeper trail

<script lang="ts">
	import { Breadcrumb } from '.';
	const deep = [
		{ title: 'Home', path: '/' },
		{ title: 'Components', path: '/docs/components/button' },
		{ title: 'Navigation', path: '/docs/components/breadcrumb' },
		{ title: 'Breadcrumb', path: '/docs/components/breadcrumb' }
	];
</script>

<Breadcrumb options={deep} activeBreadCrumb="Breadcrumb" />

Click handler

Use onclik (legacy spelling) to handle navigation yourself — each item passes { title, path, index }.

<script lang="ts">
	import { Breadcrumb } from '.';
	const options = [
		{ title: 'Home', path: '/' },
		{ title: 'Docs', path: '/docs' },
		{ title: 'Breadcrumb', path: '/docs/components/breadcrumb' }
	];
</script>

<Breadcrumb
	{options}
	activeBreadCrumb="Breadcrumb"
	onclik={({ title, path, index }) => {
		console.log(title, path, index);
	}}
/>

Props

PropTypeDefaultDescription
optionsIBreadcrumb[][]Crumb items (title, optional path, component, props)
activeBreadCrumbstring''Title that receives the active color
activeClass'pink' | 'blue' | 'red' | 'indigo' | 'purple' | 'black' | 'amber' | 'orange''blue'Active text color token
onclik(val: IBreadcrumbClick) => void—Click handler (legacy spelling of “onclick”)

IBreadcrumb

FieldTypeDescription
titlestringLabel shown in the trail
pathstringOptional href / route for the click payload
componentanyOptional custom renderer (advanced)
propsanyProps for a custom component

IBreadcrumbClick

FieldTypeDescription
titlestringClicked crumb title
pathstringOptional path
indexnumberIndex in options

© 2026 Bitblue is a registered trademark. All Rights Reserved.