<!-- GENERATED by scripts/build-llms.mjs from llms/retrieval.md — do not edit this file. -->

# `lr-path-strip`

- **Import** `import '@aceshooting/lyra-ui/components/lr-path-strip.js';` (stable tag alias; registers the tag)
- **Class** `LyraPathStrip`, also available unregistered from `@aceshooting/lyra-ui/components/retrieval/path-strip/path-strip.class.js`
- **Family** `components/retrieval/` — see `llms/index.md` for its siblings
- **Status** `stable` since `4.0.0` — see the maturity and deprecation policy in `llms/shared.md`
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
- **Deprecations** none
- **Optional peers** none
- **Themeable via** 5 parts, 0 custom properties — see this component's own `@csspart`/`@cssprop` list below
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`

---

## `lr-path-strip`

A linear node → relation → node chain rendering "why A connects to B" (GraphRAG local-search
reasoning paths) as a compact, horizontally scrollable strip. One-dimensional and presentational: no
path finding, no branching, no per-element popovers.

**Properties:**

- `path: LyraPathElement[] = []` (attribute: false) — a flat alternating sequence:
  `{ kind: 'node'; node: LyraEntity } | { kind: 'edge'; relation: string; directed?: boolean;
reverse?: boolean }`
- `label?: string` — fallback name for the stable group. Omission uses the localized path label. A
  non-empty host `aria-label` makes
  the host the sole overall owner; an explicitly empty host label stays empty on the group

**Events:** `lr-entity-activate` (`detail: { entityId, occurrenceIndex }`, a node element activated),
`lr-relation-activate` (`detail: { relation, sourceNodeId?, targetNodeId?, occurrenceIndex }`, an edge element activated —
source/target resolved from the adjacent node elements, `undefined` when the path is malformed at
that position. `occurrenceIndex` is the original supplied array position, so repeated entity ids
remain independently addressable).

**Slots:** none.

**CSS parts:** `base` (hosts the delegated roving-tabindex keydown handler), `node` (a `<button>`),
`relation` (a `<button>`), `arrow` (`aria-hidden`, logical — mirrors under RTL), `empty` (shown when
`path` is empty).

**Themeable custom properties:** shared tokens only.

**Optional peer deps:** none.

```html
<lr-path-strip></lr-path-strip>
<script>
  document.querySelector("lr-path-strip").path = [
    { kind: "node", node: { id: "a", label: "Ada Lovelace" } },
    { kind: "edge", relation: "wrote", directed: true },
    {
      kind: "node",
      node: { id: "b", label: "Notes on the Analytical Engine" },
    },
  ];
</script>
```

**Known gotchas:**

- Purely presentational rendering of a caller-supplied path — it never computes shortest paths or
  fetches relationship data itself, and never branches (one linear chain per instance).
- Blank node ids and blank relation labels are omitted. Repeated nonblank identities are deliberate
  path occurrences rather than duplicates; every event reports the supplied `occurrenceIndex`.

---
