Vanilla Breeze

adr-wc

Architectural Decision Record card in MADR format with status badges, slotted title/date content, context/decision/consequences sections, and supersedes chain linking.

Overview

A web component for rendering Architectural Decision Records (ADRs) in MADR format. The decision title and date are slotted content (headings and <time> elements), while status, supersedes chains, and detail level are attributes. Each card shows context, decision, and consequences with optional chain linking to other ADRs via fragment anchors.

Attributes

Attributes are for state and configuration — not content. The decision title and date are content and use slots instead.

AttributeTypeDefaultDescription
adr-idstringIdentifier (e.g., "ADR-001"). Auto-sets HTML id.
statusstring"proposed"proposed, accepted, deprecated, superseded
supersedesstringComma-separated ADR IDs this supersedes
superseded-bystringComma-separated ADR IDs that supersede this
detailstring"full"full, compact, minimal
compactbooleanAlias for detail="compact"
srcstring (URL)JSON data URL

Slots

SlotExpected ContentDescription
title<h2>, <h3>, etc.Decision heading — the author controls the heading level
date<time datetime="...">Decision date — machine-readable via datetime, human-readable via text content
context<p>Why the decision was needed
decision<p>What was decided
consequences<ul>Outcomes (prefix items with "Good:" or "Bad:" for clarity)

Supersedes Chain

ADRs form a decision evolution chain. Use supersedes and superseded-by to link related decisions. These render as clickable anchor chips that scroll to the referenced ADR card.

Status Colors

StatusColorMeaning
proposedBlueUnder discussion, not yet decided
acceptedGreenDecision is active and in effect
deprecatedAmberDecision is being phased out
supersededGrayReplaced by a newer decision

Events

EventDetailWhen
adr-wc:ready{ adrId, title, status }After render

Accessibility

  • Card is an <article> with aria-label
  • The title slot accepts any heading level — the author controls the document outline
  • The date slot uses <time> for machine-readable dates
  • Status badge uses colored background (not color-only)
  • Supersedes/superseded-by links are real <a> elements
  • Respects prefers-reduced-motion: reduce

Related