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

# mds-breadcrumb-item

> `@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-item>` web component represents a single navigable depth in a breadcrumb trail. It is a compound child of [`<mds-breadcrumb>`](../mds-breadcrumb/AGENTS.md) and renders a clickable label followed by a separator arrow.

#### Semantic Behavior

- **Compound child only**: Must be placed as a direct default-slot child of `<mds-breadcrumb>`; it is not used standalone and the parent's slot should contain only `mds-breadcrumb-item` elements, not mixed child types.
- **Selection is parent-orchestrated**: Clicking the item emits `mdsBreadcrumbItemSelect` with `{ id, selected }`; the parent then marks the matching item selected and clears the others, so only one item is selected at a time.
- **Selected item is the current page**: While `selected` is true the item ignores pointer clicks and keyboard activation, and its button carries `aria-current="page"`. Non-selected items remain clickable.
- **Keyboard activation**: The item responds to Enter and Space in addition to pointer clicks.
- **Decorative separator**: The trailing arrow is decorative and carries no semantic meaning.

#### Properties & Visual Configurations

This child exposes essentially no visual configuration of its own - appearance is inherited from `<mds-breadcrumb>` and the shared button system, and it has no public CSS custom property: styling overrides are done through its `button` part, the item's `<mds-button>`, with the public `--mds-button-*` custom properties.

- **`label`**: The item's visible text. This is the only way to set the text - the component renders it through an internal `<mds-button>` and exposes no default slot. It matches the `label` prop convention used across Magma components.
- **`selected`**: Marks this item as the current depth. In normal use you set it on at most one item as the initial state; thereafter the parent manages it in response to navigation. Use it only to seed which depth is active on first render.

## 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-breadcrumb-item--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 |
| --- | --- | --- | --- | --- |
| `label` | `label` | `string \| undefined` | - | Sets the label of the breadcrumb item |
| `selected` | `selected` | `boolean \| undefined` | - | Choose if the component is selected or not |

## Events

| Event | Detail | Description |
| --- | --- | --- |
| `mdsBreadcrumbItemSelect` | `MdsBreadcrumbItemEventDetail` | Emits when the breadcrumb is active |

## Parts

| Part | Description |
| --- | --- |
| `button` | The `mds-button` of the item, which shows its `label` |

## CSS custom properties

None is public: its 7 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`.
