<!--
  GENERATED FILE - do not edit by hand.
  Source of truth: src/components/mds-breadcrumb/ in the magma monorepo (usage/*.md and the
  component's JSDoc). Regenerated on every stencil build (scripts/component-docs.ts).
-->

# mds-breadcrumb

> `@maggioli-design-system/magma` 2.15.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.

The `<mds-breadcrumb>` web component is the navigation-trail container of the Magma Design System. It is a compound parent that arranges a sequence of slotted `<mds-breadcrumb-item>` children into a hierarchical path and adds an optional back-navigation control.

#### Semantic Behavior

- **Compound parent/child**: The default slot accepts only `<mds-breadcrumb-item>` children.
- **Selection tracking**: When the user selects a child it becomes the single current depth and the others are cleared. Setting `selected` from code emits nothing, so the parent does not react to it.
- **Back button**: Unless `hide-back` is set the host renders a leading arrow that steps selection to the previous item; it auto-disables whenever the first item is current (or, on load, when no item is).
- **Change event**: `mdsBreadcrumbChange` fires after any selection change - via a child click or the back arrow - carrying the new index `id` and a `caller` item: the item now selected, the clicked one or the one the back arrow steps to.
- **Localized back button**: The back button's `title` is resolved per document language (el/en/es/it).

#### Properties & Visual Configurations

This component exposes a single behavioral prop:

- **`hideBack`** removes the leading arrow control. Leave it off (the default) for multi-level trails where users benefit from a one-tap step backwards; set it for shallow or display-only breadcrumbs where reverse navigation adds no value.

Visual styling (item button colors, separator arrow color) is not driven by props, and `mds-breadcrumb` has no public CSS custom property: the colors follow the semantic roles of the theme, the selected item's included. To restyle the buttons, target the `button` part of the child [`mds-breadcrumb-item`](../mds-breadcrumb-item/AGENTS.md): it is the item's `<mds-button>`, so it takes the public `--mds-button-*` custom properties. The shared `variant` / `tone` / `size` ladders defined in [`agents/variants.md`](../../../../agents/variants.md) do not apply here; per-item labels and selection state live on the `<mds-breadcrumb-item>` children.

## Read next

- [`examples.md`](examples.md) - correct usage, from the most common case
- [`mistakes.md`](mistakes.md) - the wrong forms, each with the right one
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-breadcrumb--docs) - the live examples, in the published Storybook of `main`
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`mistakes.md`](../../../../agents/mistakes.md) - the rules shared by every component

## Props

| Prop | Attribute | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `hideBack` | `hide-back` | `boolean \| undefined` | `false` | Hides the back arrow button |

## Events

| Event | Detail | Description |
| --- | --- | --- |
| `mdsBreadcrumbChange` | `MdsBreadcrumbEventDetail` | Emits when the breadcrumb is changed |

## Slots

| Slot | Description |
| --- | --- |
| (default) | Add `mds-breadcrumb-item` element/s. |

## CSS custom properties

None is public: its 10 custom properties are internal and may change in any release. Style it with its props, its parts and the semantic roles.

## Dependencies

Uses: `mds-button`.
