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

# `lr-claim-evidence`

- **Import** `import '@aceshooting/lyra-ui/components/lr-claim-evidence.js';` (stable tag alias; registers the tag)
- **Class** `LyraClaimEvidence`, also available unregistered from `@aceshooting/lyra-ui/components/retrieval/claim-evidence/claim-evidence.class.js`
- **Family** `components/retrieval/` — see `llms/index.md` for its siblings
- **Status** `stable` since `7.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** 11 parts, 2 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-claim-evidence`

Controlled claim-by-claim grounding audit relating `GroundedClaim[]` to complete `Citation[]`
records. Dangling citation ids are ignored rather than rendered as invented evidence.

**Properties:** `claims: GroundedClaim[] = []` and `citations: Citation[] = []` (attribute: false);
`selectedClaimId: string = ''` (attribute `selected-claim-id`); `label: string = ''` (fallback name
for the overall claim region; a non-empty host `aria-label` makes the host the sole overall owner,
while an explicitly empty host label stays empty on the region).
`GroundedClaim = { id, text, status, citationIds, answerRange?, confidence?, explanation? }`, with
`status: 'supported' | 'partially-supported' | 'unsupported' | 'contradicted'`. Claim confidence
is clamped to 0–1 for localized percent display. `Citation` is the shared AI citation record
(`id`, source/chunk ids, label, locator/ranges, quote, metadata).

Claims and citations are canonicalized independently by nonblank `id`. Malformed rows and later
duplicates are omitted first-wins before empty state, controlled selection, evidence lookup,
rendering, or events. An unrecognized runtime claim status renders as localized “Unsupported” with
the danger treatment instead of producing an empty or misleading badge.

- `compact: boolean = false` (reflected) — tighter `claim-trigger` padding and column gap, for dense
  evidence lists — the same convention as `lr-source-card`'s/`lr-entity-card`'s `compact`. Purely a
  density knob: each claim's border and background stay. `false` (the default) keeps the full
  claim-trigger padding.
- `frame: LyraFrame = 'card'` (reflected) — container treatment, in the library-wide `frame`
  vocabulary (`'card' | 'plain'`). `'card'` (the default) keeps each claim's bordered, filled box;
  `'plain'` removes the border, background, and corner radius from every `claim` row, so claims
  nested inside an already-bordered container don't double the frame. `plain` wins over `compact`
  when both are set — nothing left to tighten.

**Events:** `lr-claim-select` (`{ claim }`), `lr-citation-select` (`{ citation }`). A nested
`lr-citation-badge` activation is contained and translated to `lr-citation-select`; the distinct
composed `lr-citation-open` event intentionally crosses `lr-claim-evidence` unchanged with its
`{ sourceId, index, href }` detail.

**CSS parts:** `base`, `list`, `claim`, `claim-selected`, `claim-trigger`, `status`, `claim-text`,
`confidence`, `explanation`, `evidence`, `empty`.

**Themeable custom properties:** `--lr-claim-evidence-compact-padding` (default
`var(--lr-space-xs)`) — `[part='claim-trigger']`'s padding while `compact`;
`--lr-claim-evidence-compact-gap` (default `var(--lr-space-xs)`) — the gap between
`[part='claim-trigger']`'s columns while `compact`. Both apply only in the `compact` state.
Otherwise shared tokens only.

Selection is controlled: activation emits the complete claim but does not assign
`selectedClaimId`. Evidence preserves `citations` order and silently skips dangling ids.
**Slots:** none. **Optional peer deps:** none.

```ts
import "@aceshooting/lyra-ui/components/retrieval/claim-evidence/claim-evidence.js";
```
