---
title: "Breadcrumb"
description: "Shows the path to the current page."
category: "Layout & Navigation"
slug: breadcrumb
url: /components/breadcrumb
since: "0.2.0"
status: "stable"
---

# Breadcrumb

Shows the path to the current page.

## Import

```svelte
import { Breadcrumb } from '@elluzion/iv-ui';
```

## Preview

Links for ancestors and plain text for the current page.

```svelte
<script lang="ts">
	import { Breadcrumb } from '@elluzion/iv-ui';

	const items = [
		{ label: 'Projects', href: '#' },
		{ label: 'Orbital', href: '#' },
		{ label: 'Deployments' }
	];
</script>

<Breadcrumb {items} />
```

## Usage

- The last item without `href` renders as the current page.
- Pass a `separator` snippet to replace the default chevron.
- `ariaLabel` names the navigation landmark.

## Examples

### Icons

Each item can carry an icon snippet before its label.

```svelte
<script lang="ts">
	import { IconFolder, IconHome } from '@tabler/icons-svelte';
	import { Breadcrumb } from '@elluzion/iv-ui';
</script>

{#snippet home()}<IconHome size={12} />{/snippet}
{#snippet folder()}<IconFolder size={12} />{/snippet}

<Breadcrumb
	items={[
		{ label: 'Home', href: '#', icon: home },
		{ label: 'Projects', href: '#', icon: folder },
		{ label: 'Orbital' }
	]}
/>
```

### Custom separator

The `separator` snippet replaces the chevron.

```svelte
<script lang="ts">
	import { Breadcrumb } from '@elluzion/iv-ui';

	const items = [
		{ label: 'Projects', href: '#' },
		{ label: 'Orbital', href: '#' },
		{ label: 'Settings' }
	];
</script>

{#snippet separator()}<span class="sep">/</span>{/snippet}

<Breadcrumb {items} {separator} />

<style>
	.sep {
		font-family: var(--iv_font-mono);
		font-size: var(--iv_text-sm);
		color: var(--iv_bracket);
	}
</style>
```

### Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` **required** | `BreadcrumbItem[]` | — | Trail entries. The last item is rendered as the current page. |
| `ariaLabel` | `string` | `'Breadcrumb'` | Accessible name for the navigation landmark. |
| `className` | `string` | `''` | Extra classes merged onto the root element. |

`class`, `id`, `style`, `aria-*`, and `data-*` are forwarded through rest props.

### Snippets

| Snippet | Type | Description |
| --- | --- | --- |
| `separator` | `Snippet` | Custom separator snippet; defaults to `/`. |

### Types

#### `BreadcrumbItem`

One entry in a breadcrumb trail.

```ts
type BreadcrumbItem = {
	label: string;
	href?: string;
	icon?: Snippet;
};
```

### Tokens used

`--iv_breadcrumb-pad-x` · `--iv_ease-in-out` · `--iv_font-mono` · `--iv_foreground` · `--iv_foreground-dim` · `--iv_leading-base` · `--iv_radius-sm` · `--iv_ring` · `--iv_ring-width` · `--iv_spacing-xs` · `--iv_surface-overlay` · `--iv_text-sm` · `--iv_transition-base` · `--iv_weight-medium`

See the [token reference](/foundations/tokens.md) for values.

### CSS hooks

`.iv-breadcrumb` · `.iv-breadcrumb-item` · `.iv-breadcrumb-sep`

## Accessibility

- The trail is a `<nav>` with an accessible name.
- The current page uses `aria-current="page"`.
- Separators are hidden from assistive technology.

## Related

- [Tabs](/components/tabs.md)
- [Card](/components/card.md)
- [Article](/components/article.md)
- [Separator](/components/separator.md)