Draft
feat: Card component — all 10 integration surfaces#239
Conversation
Open
Adds the Card component (issue #44) across all 10 required surfaces: - Component tokens (figma/exports/Patterns (UI).tokens.json) - CSS pattern (src/ui/patterns/card.css) with media slot, header/body/footer, interactive variant, horizontal layout, selection state - CSS index import (src/ui/index.css) - Nunjucks macros: card(), cardMedia(), cardHeader(), cardBody(), cardFooter() - Web Component: ui-card.js with UICard, UICardMedia, UICardHeader, UICardBody, UICardFooter - Element exports (src/elements/index.js, package.json) - Docs page (site/patterns/card.md) - Playground page (site/patterns/card-playground.md) - Playground renderer renderVanillaCard (site/assets/playground/renderers.js) - Code Connect schema (schemas/web-card.figma.ts, schemas/web-card.ts) - Regenerated naming contract and token dist files
- Remove inconsistent gap fallback values in card.css (token always defined) - Fix aria semantics: remove redundant role="link" from <a> cards in macro - Fix aria-pressed → aria-current="true" for selected link cards (macro + web component) - Playground renderer code string uses aria-selected for <article> cards correctly
Copilot
AI
changed the title
[WIP] Add card component for grouping related information
feat: Card component — all 10 integration surfaces
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Baseline documentation change
Scope
Implements the Card component (Prio 2 Extended, issue #44) across all required integration surfaces. Card is a content container supporting image/media slots, header/body/footer structure, interactive (clickable) variant, horizontal and vertical layouts, and a selection state.
Tokens — 12 component-scoped tokens added to
figma/exports/Patterns (UI).tokens.json:--uif-card-border-radiususes the pre-existingBrand/Corner/CardtokenCSS pattern —
src/ui/patterns/card.css:.uif-card-media,.uif-card-header,.uif-card-body,.uif-card-footer.horizontal(flex-direction row, media constrained to 40% inline).is-selectedapplies brand border color at 2× weightNunjucks macros —
card(),cardMedia(),cardHeader(),cardBody(),cardFooter()added tosite/_includes/macros/ui.njk. Link cards (hrefset) usearia-current="true"for selected state; article cards usearia-selected="true".Web Component —
src/elements/ui-card.jsregistersuif-card,uif-card-media,uif-card-header,uif-card-body,uif-card-footer. Exported fromsrc/elements/index.jsand added topackage.jsonexports map.Docs + Playground —
site/patterns/card.mdcovers anatomy, layout options, interactive/selection states, usage guidelines, keyboard interactions, and accessibility.site/patterns/card-playground.mdexposes title, body, layout, interactive, selected, showMedia, and showFooter controls.Code Connect —
schemas/web-card.figma.tsmaps Layout, Interactive, and State Figma properties to CSS class composition.Review checklist
docs/terminology.md.docs/canonical-reference-matrix.mdis updated when new terms, rules, or canonical sources are introduced.@ui-foundations-maintainershas been notified for review.